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
 
 
When You Register, These Ads Go Away!
Old 08-25-2008, 01:03 PM Re: ODBC drivers error to compilation error
chrishirst's Avatar
Super Moderator

Posts: 22,226
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!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
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,674
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.
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.12235 seconds with 13 queries