Re: ASP.NET / VBScript Connection Error --- Please Help -- :)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bruce Pullum (BrucePullum_at_discussions.microsoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 13:55:14 -0700

Thanks for the help... I am not sure I follow... I am wanting to do
something on Client Side, not server side. When I use the ASP.NET (on the
server side with a postback) I do use the SQLClient and ADO.NET. I agree
100% it is wonderful... However, what I am trying to do is to have the
CLIENT SIDE script go out and look up a last name, based on an ID, when the
user types in the number and leavs the field. I am wanting this to happen on
the "onblur" event. So, I am trying to get VBScript or JavaScript to work
for this... A postback has not taken place at the time the lookup is to take
place....

Again, thanks for your help and I look forward to your future assistance....

"Viatcheslav V. Vassiliev" wrote:

> In ASP.Net you should use ADO.Net - it is very different from ADO.
>
> Public Sub ReadMyData(myConnString As String)
> Dim mySelectQuery As String = "SELECT OrderID, CustomerID FROM Orders"
> Dim myConnection As New SqlConnection(myConnString)
> Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
> myConnection.Open()
> Dim myReader As SqlDataReader
> myReader = myCommand.ExecuteReader()
> ' Always call Read before accessing data.
> While myReader.Read()
> 'First column is integer, second is string
> Console.WriteLine((myReader.GetInt32(0) & ", " &
> myReader.GetString(1)))
> End While
> ' always call Close when done reading.
> myReader.Close()
> ' Close the connection when done with it.
> myConnection.Close()
> End Sub 'ReadMyData
>
>
> Connection string also differs. For example, it could be "Persist Security
> Info=False;Integrated Security=SSPI;database=northwind;server=mySQLServer"
>
> Look .Net SDK documentation - classes SqlConnection, SqlCommand,
> SqlDataReader
>
> //------------------------------------
> Regards,
> Vassiliev V. V.
> http://www-sharp.com -
> Scripting/HTA/.Net Framework IDE
>
> "Bruce Pullum" <Bruce Pullum@discussions.microsoft.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
> ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
> news:44E92BCC-26CD-4CA4-8B6E-BE79D2E5707D@microsoft.com...



Relevant Pages

  • Re: MAC Address
    ... Note that the IP address of the client is not reliable ... MAC addresses on the computer on which the code resides, but the server ... Dim SessionID As Int32 'DWORD integer ... ByVal SessionId As Int32, ByVal WTSInfoClass As Int32, ...
    (microsoft.public.windows.terminal_services)
  • Re: Using Visual Basic NET to Access Terminal Services Session and Client Information
    ... It also accesses the Client Information for the client which executes ... this program on a Terminal Services Server. ... Dim pWinStationName As String ' integer LPTSTR - Pointer to a null-terminated string containing the name of the WinStation for this session ... ByVal SessionId As Int32, ByVal WTSInfoClass As Int32, ByRef ppBuffer As String, ByRef pCount As Int32) As Boolean ...
    (microsoft.public.windows.terminal_services)
  • Using Visual Basic NET to Access Terminal Services Session and Client Information
    ... It also accesses the Client Information for the client which executes this program on a Terminal Services Server. ... Dim pWinStationName As String ' integer LPTSTR - Pointer to a null-terminated string containing the name of the WinStation for this session ...
    (microsoft.public.windows.terminal_services)
  • Re: Socket.Receive hangs
    ... client to a server and receives messages in return. ... functionality is made with sockets which is working just fine except of ... Dim oRemoteEndPoint As New System.Net.IPEndPoint ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Socket.Receive hangs
    ... "Tom Shelton" wrote in message ... client to a server and receives messages in return. ... Dim oRemoteEndPoint As New System.Net.IPEndPoint ...
    (microsoft.public.dotnet.languages.vb)