Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection Problem

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I develop currently in VB..I am getting into vbscript with ASP. I am trying to connect to a simple access database using the following code.

Dim cnn, strCnn

strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DB.mdb"

Set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open strCnn

I get the following error..

"ADODB Cannot create object
apartment thread componets cannot be created."

Like i said, i know VB pretty good it's the vbscript thats seems to be a little confusing to me. can someone tell me what refrences i should be added and maybe some connection and recordset examples...I am using ASP.NET vbScript

I also see alot of therads with people using <% %> is that part of vbscript ?? when i try adding that to the code I get an error as well..

thanks in advance..
 
See thread333-406382

I believe your error is in &quot;Data Source=C:\DB.mdb&quot;
Try these pages:

ADO OLE DB Connection String (Microsoft Access)

Comments: Don't use this driver unless you have absolutley no other choice. It's pants, suffers from Memory leaks and can be a real pain if you're using password protected MDBs


-- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top