|
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
%>
|