vb6 Kuwait
  • 18 years ago

    What I have here is the basics for connecting to a database. I have done a bit of ASP stuff and I don't know if it is the same but you can try.


     ' * Database connection Strings * '
     strdbname = databse.mdb
     ' * Open Database * '
     Set oConn = CreateObject("ADODB.Connection")
     oConn.Open ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & strdbname & ";")
     strdbsql = "SELECT * FROM tablehere ORDER by " & 'variable here
     Set oRS = oConn.Execute(strdbsql)

     ' * Close Database * '
     Set oRS = Nothing
     Set oConn = Nothing

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”