[thelist] ASP Question
Joel Morris
joelm at citycent.com
Fri Oct 11 01:14:00 CDT 2002
All of the data you are inserting into the DB are strings - it's most
likely that one of the fields wants a different data type.
Is your IpAddr field a number? Is your Day field a date? If so,
either/both of those could cause this error.
If that still doesn't do it, do a Response.Write("sql") to see what
the query actually looks like - it's my most common debug tool when I
can't get something to work with a database query.
Best, Joel Morris
-------------------------------
CityCenter Co.
Website Development & Marketing
http://www.citycent.com
mailto:joelm at citycent.com
-----Original Message-----
Hi there. I am an ASP newbie so dont bite my head off if this is a
silly mistake.
sql = "INSERT INTO stuff(PostedBy,IpAddr,Day,Message) VALUES
('"&straddr&"','"&strday&"','"&strip&"','"&strmsg&"')"
objconn.Execute(sql)
My database is called update with a table in it called stuff. I have
four columns
PostedBy, IpAddr, Day, Message in that order.
I have this page linked into a form, from which the results are
stored.
However, I keep getting the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in
criteria expression.
/display/add.asp, line 16
I really am stuck on this one. It has taken me a long time to get my
connection right but i finally have but there are still errors.
There is a test version at
www.elementdesign.dc-hosting.co.uk/display/addit.asp
Please please please help.
Thanks in advance.
Giles Carey giles at elementdesign.biz www.elementdesign.biz
More information about the thelist
mailing list