Reading Variable From Server
Aug 27, 2010I'm new in VB and I have a problem: after clicking on button, program connects to [URL] which has this text
[Code]...
I'm new in VB and I have a problem: after clicking on button, program connects to [URL] which has this text
[Code]...
I am trying to retrieve a 'tag'(Is it called that?) from an XML webpage. Once I make a post request from my vb.net app it sends a command to my online webserver and redirects me to a page that has entries that change each time. The page that im redirected to that changes each time looks something like this:
<mainpage> <id>hello</id> <random>176</random> </mainpage>
What vb.net code would I use to retrieve the id (In this case 'hello') and store it in a variable.
Trying to read in three variables per line from a text file that looks similar to the first code segment. What we've been taught so far to read in is something similar to the second segment. And it works all and good for single words per line.
If this was C++ I'm pretty sure I could getline and use the comma as a terminator, but I'm not sure if a similar function exists for VB.
Bacon, 15.95, In stock
Stuff, 3044, warehouse
Something here, 84444, end of the road
[Code].....
How can I read data from textbox1 to....n using cycles? Something like this:
1. For n=1 to 50
2. text=textbox_n.text
3. Output=output+text
4. Next
5. Msgbox(output)
The question is in line 2. Syntax "textbox_n.text" is not right. How is it possible to read from textboxes using cycle and variable n?
I have a text file. It has the following content.
5.000000 tEND =
1.0305644E-03 t_exposure=
32.50000 T_hfg=
20.50941 Temperature
-0.5424923 Heat flux
15.39559 impinging temperature
I have to read each line and assign the value to the variable in vb.net. for example i will declare tend, t_exposure, T_hfg, Tem, Heatflux as single in vb.net. Then I should read the file and assign
[Code]...
I have a variable defined as Object(,) that was read in from excel. Without getting into a for/next, is there a simple way to read the c-th column or r-th rown from that array into a single variable?
View 2 RepliesI have a remote text file on http://somewhere... that I need to read into a string variable in vb.net. What is the simplest way to do this?
View 1 RepliesWhat is the best practice if need to read/open file that is located on a different server?How to do this? I know opening a local file is easy, but what to do if the file's on a different server?
View 1 RepliesI am writing an application that will call a SQL Server job on all our client's systems. I'm able to execute it, and wait until it's finished. It has an output file that's save location is hard coded into the job however, and this is not the same location on all client's.
Since the job is identical on systems minus this one value, I want my code to read in the script of the job and parse out the location.I'm having trouble figuring out how to get the actual text of the job itself.
Is this possible in .NET? If so, how?
I am working on a project in which the user can play another user on over the internet. Basically, how would i go about this?
What type of server would i need? Would i just use a designated computer as a server?
Also, what is the general process in contacting a server, reading/ writing from/to a server and storing data onto a server?
the following code is not reading the registry on a 64bit server 2008. I don't think that I have it correct and am looking for assistance.
Protected Overrides Sub OnStart(ByVal args() As String)
Dim messagestr As String = ""
''first lets read the registry in order to get ip addresses etc..
[code].....
i am trying to read data from a sql 2000 database.one of the fields is defined as datatype:image, Length:16.when I am in SQL management studio and do a select for this one column.[code]when i do a datalength on this field it come up with 2404/My question is, I know this is a numeric field, how do i read this into a vb app and how do I break this down into individual values?
View 2 Repliesfind sample code to "read" a text file from a web server? This is the file: [URL]
I want to be able to evaluate if it contains some specified text... How can I refer to this file using VB.net and store it in a string variable?
Here's an example of what I want to do:
boolean aaa = false
'The following is located in the "tick" event handler of an activated timer with an interval of 600000 ms
[Code].....
I want to be remotely command all of my programs do something like this, all I have to do is to change the text in the text file to "now"
I am writing an application to grab attachments from messages in a particular folder in an Exchange server account and then process them. The processing of the attachments should be no problem, but what I don't know how to do is to connect to the Exchange server and access the messages.
What I would like to know is what references and imports I need, and how to access the various objects in the object model. I have been looking at CDO already, but I have had problems finding help on the Internet that is relevant to VB.NET.
For example, I'd like to know how to create the Exchange object, log in and navigate to the folder that has the relevant messages in it.
I want to create a CLR on SQL Server for reading flat files (txt) line by line.
I done it like this.
Imports System
Imports System.IO
Imports System.Collections
[Code]....
I am experiencing an error. I have a microsoft sql server database and need to colelct the data from the results and get the nullreference error shown below. I check the SQL string and executed it directly in the database and it yielded the correct results.
Quote: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. I use this code for connecting and reading the DB:
[Code]...
I have a property active to indicate status of an employee. Along with all the details, i extract the details from an employee table into a dataset, but however i am not able to get the value present in active as i get an invalid cast exception.
This is the property declaration.
CODE:
Reading bit type sql server db column from dataset
View 3 Replies[Code]...
I have Memberships and Bookings tables in database containing an attribute cust_id which is primary key in Memberships and reference key in Bookings. When i am executing data reader I want it to read cust_id values from membership table but it is reading it from the bookings table.....
[Code]...
i just want to read unread mails from mail server and to download the attachment of the mail.
View 1 RepliesSo I have set up a basic client/server connection and I am trying to send a message to one another on connection, I got the client to receive the message from the server, but the server doesn't recieve the clients message. Here is my current code for reading the sent data from the client:
ServerThread.socket = new ServerSocket(5556);
Socket client = ServerThread.socket.accept();
DataInputStream in = new DataInputStream
[code]....
I have a TCP Socket Client (using the Socket Class) that is connected to a simple TCP socket server (just for testing)I have this code snippet :
Dim aSocket as Socket
While aSocket.Connected = True
byteRead = aSocket.Receive(dataByte) 'number of bytes
[code].....
Please excuse my choice of wording and/or mixup of terms, I am a dummy when it comes to socket programming. I am trying to connect to a TCP server, write a message and process a response. I use the following code:
Dim tcpClient As Sockets.TcpClient = New TcpClient()
tcpClient.Connect(hostname, 9080)
Dim networkStream As NetworkStream = tcpClient.GetStream()
[code].....
Im using VB.NET 2008 and SQL Server 2005.Im using the table .The table look like the following:[code]....
I m trying to get the value of a cell in a variable... Let's say I want the "Firstname" of the employee who's ID is "2" in the variable "oVar". How can?I do that? ...
Dim oVar as String
oVar = SELECT Firstname FROM tblEmployees WHERE ID='2'
I'm writing a program that will be based off of TCP communications with a server. The user would click a button, which would send data through TCP Client to the TCP Listener on another computer. The TCP Listener sends back a response, and the TCP client is receiving it. Right now I have the response from the server showing up in the immediate window, which is good. I want the response from the server to determine what action the client program will take next.
How do I use the server's response variable in a different class? I need to use the response from the server in an if-then-else statement to say "if the server response is 001, then execute this code. else, if the response is 002, then execute this code."
I have a client/server program. There is a variable called readData that takes returndata and places it there. My question is, why can't I access this variable directly, for instance, varC = readData and then try to access a piece of it i.e. textbox1.text = varC(2), I get an error "object reference not set to instance of an object". Why is this happening? It is because the readData is a networking 'component'? How do I get around this? I can post more code from the server app if needed.
[Code]...
I have a Server side variable by the following code
Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get
Return mgps.ToString
End Get
[Code]...
I have a Server side variable by the following code
Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get[code]..........
and replace the store_locations with GPS but my map become empty.
Code of my web page.I made changes according to ur suggestions but title is invisible or not displaying what has missed by me [code]...
View 1 Repliesi just got 1 question how do u create a (in excel ) variable table (database) inside a function which could be called for filling and reading through "for to next" loop module
View 2 Replies