I'm so used to programming in VBA for Microsoft Access, but I also use VBScript in ASP for my website. The two are 90% alike, but there are a lot of differences.
For example...
If you want to program a recordset to read a bunch of records in Access, it's just:
dim rs as recordset set rs = currentdb.openrecordset("CustomerT") 'do stuff
But in ASP, if you want a recordset, you have to dim a "connection" first, which I usually declare as Conn.
Dim Conn, RS set Conn = Server.CreateObject("ADODB.Connection") Conn.Open Application("DATABASE_CONNECT_STRING") Set rs = Server.CreateObject("ADODB.Recordset") rs.Open "CustomerT", Conn
Well, when I'm rushing and not paying attention, I always forget to declare the Conn.
And then I scratch my head for 30 minutes trying to figure out why the database won't connect.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Captain's Log.