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
ODBC drivers error to compilation error
Old 08-25-2008, 12:56 PM ODBC drivers error to compilation error
Junior Talker

Posts: 2
Trades: 0
Hi everyone,
I am an ASP neophyte and I am also trying to get a client's form over to godaddy.

The function of the form is to let users sign up for tennis courts.

I moved a working includes file to godaddy and received this error:

"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x12b0 Thread 0x1864 DBC 0x2c71bac Jet'."


GoDaddy kindly directed us to sample code for using File DSN and ASP/ADO to connect to an Access Database.


I integrated their code in to includes file and now get the following error message:


Microsoft VBScript compilation error '800a0401'
Expected end of statement
/we/includes.asp, line 58
strThisSaturday = DateAdd("d", 7-strWeekDay, date()) strEndDate = DateAdd("d", 8-strWeekDay, date()) strStartDate = DateAdd("d", -5, strThisSaturday)
-----------------------------------------------------^

Our current version of the includes file is below. Thank you for any help--we need it!


-Jeff


<%

Option Explicit
Dim oConn, oRs, sql, rs, aData

Dim qry, connectstr, sDSNDir

Dim db_name, db_username, db_userpassword

Dim dsn_name


Set oConn = Server.CreateObject("ADODB.Connection")

dsn_name = "access_tennis.dsn"

fieldname = "tennis.mdb"


'assumes that _dsn exists in the root
sDSNDir = Server.MapPath("/_dsn")

connectstr = "filedsn=" & sDSNDir & "/" & dsn_name



oConn.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\Inetpub\wwwroot\WE\tennis.mdb;"
Dim strThisSaturday, strWeekDay, strStartDate, strEndDate

strWeekDay = Weekday(date())
strThisSaturday = DateAdd("d", 7-strWeekDay, date()) strEndDate = DateAdd("d", 8-strWeekDay, date()) strStartDate = DateAdd("d", -5, strThisSaturday)

'Response.Write(strStartDate & "<br>")
'Response.Write(strEndDate & "<br>")

Function MakeUSDate(x)
If Not IsDate(x) Then Exit Function
MakeUSDate = "#" & Month(x) & "/" & Day(x) & "/" & Year(x) & "#"
End Function
%>





jtancil is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-25-2008, 01:03 PM Re: ODBC drivers error to compilation error
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
c:\Inetpub\wwwroot\WE\tennis.mdb is that EXACTLY where the file is?

You would be better off using server.mappath to point to the database

http://www.webmaster-talk.com/asp-fo...es-script.html
__________________
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 online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-25-2008, 01:13 PM Re: ODBC drivers error to compilation error
Junior Talker

Posts: 2
Trades: 0
Thank you, Chris.
So, skip GoDaddy's suggestion and confirm the correct location?

I will check on that location.
jtancil is offline
Reply With Quote
View Public Profile
 
Old 08-28-2008, 06:52 PM Re: ODBC drivers error to compilation error
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Make sure you have write privs, too. I've seen read only Access databases be put in read only (by ACL) folders, which means the end user isn't able to create a lock file.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ODBC drivers error to compilation error
 

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.20404 seconds with 12 queries