ADO.Net in JScript Question

  • Thread starter Thread starter slimasian
  • Start date Start date
S

slimasian

Hey guys,

Relative newbie to ADO here. I wanted to see if I could perhaps
receive some guidance from the experts in here. I need to create an
ADO connection to a SQL Server database in JScript. I read SOME
material on MSDN, but it is very confusing. Just a few simple
questions...any help at all would be extremely appreciated:

1) How do I create an ADO connection through JScript? Once I do have
a connection, all I want to do is a simple query that will return
only one row...I'd assume once the ADO is open, I'd do something
similar to sqlConnection.ExecuteNonQuery, a la VB.NET?

2) Once my query has executed, how can I pass that value onto a
variable? Like I said, my query will only return one row, and I am
only selecting one value. How do I pass that onto a variable in
JScript?

Thanks a lot for the help, guys.

slim...
 
If you already know JScript (which I don't, having only worked with it
only once in my life), then what you really need is a primer on
ADO.NET. If you look at the C# example code in the help files you'll
find that the syntax is closer than VB syntax. Another good resource
is David Sceppa's book, ADO.NET, which has sample code in both VB and
C#.

--Mary
 
Back
Top