Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 01-07-2008, 06:51 PM Need help with my DB
Junior Talker

Posts: 3
Name: Dean Dounev
Location: Ottawa, Ontario
Trades: 0
Hi,
I'm new at this and need some help. Trying to build a simple DB for my daughter's club. Created an account with Godaddy.
Here is my problem: Everything works until I hit the final "Submit" and the following shows on my screen:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn ''
/Fencing/exoadd.asp, line 15

Here is my code:
<%
Dim adoCon
Dim sql
Dim connectstr, sDSNDir
Dim dsn_name
dsn_name = "access_fencing.dsn"
sDSNDir = Server.MapPath("_dsn")
connectstr = "filedsn=" & sDSNDir & "/" & dsn_name
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open connectstr

Have a DSN file named access_fencing.dsn
DB name is fencing.mdb in a folder named access_db
The rest of my files are in folder named Fencing

What am I doing wrong?

Thank you in advance.
newatthis is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-09-2008, 04:59 PM Re: Need help with my DB
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
is the file in a folder called "_dsn" within the site folders?

the slash should be the opposite way
Code:
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
as this is a physical path.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-10-2008, 10:29 PM Re: Need help with my DB
Junior Talker

Posts: 3
Name: Dean Dounev
Location: Ottawa, Ontario
Trades: 0
I don't have a folder called _dsn. Here is the structure:
Folder - Root
Folder - access_db containing file "fencing.mdb"
Folder - Fencing containing files: "exo_confirm.asp", "exoadd.asp" and "exoform.htm"

Tried with the slash in the oposite way and got the same error message.

Last edited by newatthis; 01-10-2008 at 10:31 PM..
newatthis is offline
Reply With Quote
View Public Profile
 
Old 01-11-2008, 04:16 AM Re: Need help with my DB
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I don't have a folder called _dsn
this code;
Code:
sDSNDir = Server.MapPath("_dsn")
connectstr = "filedsn=" & sDSNDir & "/" & dsn_name
is telling the server to find a folder called "_dsn" and look for the DSN file in it.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-16-2008, 03:42 PM Re: Need help with my DB
Skilled Talker

Posts: 97
Name: Ganesh
Trades: 0
Dean,

I attempted another way based on your posts.

Back up your existing file. Use the below code instead of what you provided on the first post.

Code:
<%
Dim adoCon 
Dim sql
Dim connectstr, sDSNDir
connectstr="Driver={Microsoft Access Driver(*.mdb)};DBQ=" & Server.MapPath("/access_db/fencing.mdb")
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open connectstr
%>
Hope this helps . Good Luck!
__________________
Gather. Search. Compare. Save on Hotel and Flight Prices @
Please login or register to view this content. Registration is FREE

Last edited by sri_gan; 01-16-2008 at 03:43 PM..
sri_gan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help with my DB
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25850 seconds with 12 queries