error 80004005

K

koneko

I want to write something to access database and i get an error
Microsoft JET Database Engine error '80004005'


Field 'ad_log.sponsor' cannot be a zero-length string.


/djas/got.asp, line 7


this is my code:


<%@ language="VBSCRIPT" %>
<%
sponsorURL = Request.querystring("url")
set outpostDB = Server.CreateObject("ADODB.Connection")

outpostDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("outpost.mdb")
sqlText = "insert into ad_log (sponsor, clickDate) values ('" &
sponsorURL & "', Now())"
outpostDB.Execute(sqlText)
outpostDB.Close
set outpostDB = Nothing

Response.Redirect sponsorURL


%>
the problem is in outpostDB.Execute(sqlText)
and i dont know what the problem..
 
T

Thomas A. Rowe

You either to all zero length in the attribute for the field in the database, or you must submit a
value to the database.

Most likely you are not grabbing the date to be inserted

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top