Hello
I am writing to ask for assistance with the following error message I am getting:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Field 'IPAddresses.IPAddress' cannot be a zero-length string.
/main.asp, line 23
This is the code I have:
<%
' Declaring variables
Dim VisitorID, IPAddress, data_source, con, sql_insert
data_source = "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\business\etc.mdb;"
sql_insert = "insert into IPAddresses (VisitorID, IPAddress) values ('" & _
VisitorID & "', '" & IPAddress & "')"
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
' Done. Close the connection
con.Close
Set con = Nothing
%>
and line 23 (reading from the very top of the page) seems to refer to: con.Open data_source (though I may be mistaken).
If the error does not lie in the above code, is it possible that the data type I have in my MS Access fields is wrong?
Much appreciated.
EvertonFC
I am writing to ask for assistance with the following error message I am getting:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Field 'IPAddresses.IPAddress' cannot be a zero-length string.
/main.asp, line 23
This is the code I have:
<%
' Declaring variables
Dim VisitorID, IPAddress, data_source, con, sql_insert
data_source = "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\business\etc.mdb;"
sql_insert = "insert into IPAddresses (VisitorID, IPAddress) values ('" & _
VisitorID & "', '" & IPAddress & "')"
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
' Done. Close the connection
con.Close
Set con = Nothing
%>
and line 23 (reading from the very top of the page) seems to refer to: con.Open data_source (though I may be mistaken).
If the error does not lie in the above code, is it possible that the data type I have in my MS Access fields is wrong?
Much appreciated.
EvertonFC