RSS Forums RSS
Please support our MS SQL advertiser: Programming Forums
Views: 2695 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Sep 2005
Posts: 3
Reputation: webDev04 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
webDev04 webDev04 is offline Offline
Newbie Poster

can not connect to db

  #1  
Sep 13th, 2005
i decided to switch over to ms access (thinking it would be easier) from mssql but i am having the same problem that i had with ms sql: "SQL Server does not exist or access denied"
i have put the ms access db into the web server from the web hosting company which i am using.
my db name is: evcsDb.mdb
its in the www/bin/ directory
this is what my code looks like:

dim pathDB as string = Server.MapPath("bin\evcsdb.mdb")
dim connString as string = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & pathDB & ";User id=Admin;"

Dim loginConn As OleDb.OleDbConnection
loginConn = New OleDb.OleDbConnection(connString)

loginConn.Open()
please help!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2005
Posts: 9
Reputation: amitlokare is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
amitlokare amitlokare is offline Offline
Newbie Poster

Re: can not connect to db

  #2  
Sep 15th, 2005
Hi
Try this code and put database in same directory as tht of asp page

curDir = Server.MapPath("calender.mdb")
Set Conn=server.createobject("adodb.connection")
Conn.Open "DBQ="&curDir&";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the MS SQL Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:00 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC