Re: ASP.NET / VBScript Connection Error --- Please Help -- :)
From: Bruce Pullum (BrucePullum_at_discussions.microsoft.com)
Date: 09/10/04
- Next message: Lev Burov: "Re: ASP version or code problem?"
- Previous message: McKirahan: "Re: ASP version or code problem?"
- In reply to: Viatcheslav V. Vassiliev: "Re: ASP.NET / VBScript Connection Error --- Please Help -- :)"
- Messages sorted by: [ date ] [ thread ]
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...
- Next message: Lev Burov: "Re: ASP version or code problem?"
- Previous message: McKirahan: "Re: ASP version or code problem?"
- In reply to: Viatcheslav V. Vassiliev: "Re: ASP.NET / VBScript Connection Error --- Please Help -- :)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|