Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 07:30 AM
J. Muenchbourg
Guest
 
Posts: n/a
Default Access dbase connection string errors

I keep getting
"Unable to open registry key 'Temporary (volatile) Jet DSN "
errors pointing to my connection string when the same connection string
is working for a few of my other pages. The MSAccess database does have
the right permissions configured. Below is code I'm using:

<%
dbcon="DBQ=" & Server.Mappath("diary.mdb") & ";Driver={Microsoft Access
Driver (*.mdb)};"
Set calConn = Server.CreateObject("ADODB.Connection")
calConn.Open dbcon%>
<%dim freetsql,rsfree
freetsql = "select text_field from diary where dte ='" & dfm & "'"
set rsfree = Server.CreateObject("ADODB.Recordset")
rsfree.Open freetsql,calConn,3 %>


???
Muench

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2  
Old July 19th, 2005, 07:30 AM
Ray at
Guest
 
Posts: n/a
Default Re: Access dbase connection string errors

Try this connection string:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.Mappath("diary.mdb")
OLEDB

Then, after that's all working, go to
http://yoursite.com/TheDirectoryWithTheDB/diary.mdb and notice that you are
prompted to download your database. Anyone would be able to download your
database that way.

For further information on the error you received, read
http://www.aspfaq.com/2009.

Ray at work

"J. Muenchbourg" <jodaddy@canada.com> wrote in message
news:u0YpzzdXDHA.2256@TK2MSFTNGP10.phx.gbl...[color=blue]
> I keep getting
> "Unable to open registry key 'Temporary (volatile) Jet DSN "[/color]
[color=blue]
> <%
> dbcon="DBQ=" & Server.Mappath("diary.mdb") & ";Driver={Microsoft Access
> Driver (*.mdb)};"[/color]


  #3  
Old July 19th, 2005, 07:30 AM
Mats
Guest
 
Posts: n/a
Default Re: Access dbase connection string errors

Then, after that's all working, go to
http://yoursite.com/TheDirectoryWithTheDB/diary.mdb and notice that you are
prompted to download your database. Anyone would be able to download your
database that way.
Yes, just checked. How could we avoid that?
Mats

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<#6faN3dXDHA.888@TK2MSFTNGP10.phx.gbl>...[color=blue]
> Try this connection string:
>
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
> Server.Mappath("diary.mdb")
> OLEDB
>
> Then, after that's all working, go to
> http://yoursite.com/TheDirectoryWithTheDB/diary.mdb and notice that you are
> prompted to download your database. Anyone would be able to download your
> database that way.
>
> For further information on the error you received, read
> http://www.aspfaq.com/2009.
>
> Ray at work
>
> "J. Muenchbourg" <jodaddy@canada.com> wrote in message
> news:u0YpzzdXDHA.2256@TK2MSFTNGP10.phx.gbl...[color=green]
> > I keep getting
> > "Unable to open registry key 'Temporary (volatile) Jet DSN "[/color]
>[color=green]
> > <%
> > dbcon="DBQ=" & Server.Mappath("diary.mdb") & ";Driver={Microsoft Access
> > Driver (*.mdb)};"[/color][/color]
  #4  
Old July 19th, 2005, 07:30 AM
Ray at
Guest
 
Posts: n/a
Default Re: Access dbase connection string errors

Do not keep your mdb file in your website's directory structure. I.E.


Physical path on server to .htm/.asp files:
D:\Websites\Website1


Put mdb databases elsewhere, like:
D:\Databases\Website1\diary.mdb

When you do that, your Server.MapPath will no longer work, since that will
no longer be the path to your DB, but I think that's a minor tradeoff. You
could keep the path to your DB in an application variable or a global
constant. More on this topic can be found at:
http://www.aspfaq.com/2454
http://groups.google.com/groups?thre...ing.google.com

Ray at work


"Mats" <webmaster@databyggarna.com> wrote in message
news:51955fa2.0308081407.23db8187@posting.google.c om...[color=blue]
> Then, after that's all working, go to
> http://yoursite.com/TheDirectoryWithTheDB/diary.mdb and notice that you[/color]
are[color=blue]
> prompted to download your database. Anyone would be able to download your
> database that way.
> Yes, just checked. How could we avoid that?
> Mats
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles