Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,'','','','')' at line 1
/save_inc.asp, line 47
I'm getting this error , when i use response.write(sql) instead of db_conn.execute(sql) it works fine .
for i=0 to (tSim_num)
LINE 47 :
sql = "insert into tach values (null,"&projID&",'"&t_carr(i)&"','"&t_carType(i)&" ','"&t_host(i)&"','"&t_dir(i)&"','"&t_pin(i)&"','" &tSim_ip(i)&"',"&t_num(i)&","&t_pc(i)&","&t_UID1(i )&","&t_UID2(i)&",'"&t_by(i)&"','"&t_par(i)&"','"& t_im(i)&"','"&t_auto(i)&"')"
db_conn.execute(sql)
next
Plz help
2 2989 jhardman 3,406
Recognized Expert Specialist
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,'','','','')' at line 1
/save_inc.asp, line 47
I'm getting this error , when i use response.write(sql) instead of db_conn.execute(sql) it works fine . -
for i=0 to (tSim_num)
-
LINE 47 :
-
sql = "insert into tach values (null,"&projID&",'"&t_carr(i)&"','"&t_carType(i)&"','"&t_host(i)&"','"&t_dir(i)&"','"&t_pin(i)&"','"&tSim_ip(i)&"',"&t_num(i)&","&t_pc(i)&","&t_UID1(i)&","&t_UID2(i)&",'"&t_by(i)&"','"&t_par(i)&"','"&t_im(i)&"','"&t_auto(i)&"')"
-
db_conn.execute(sql)
-
next
Plz help
It looks like you are passing a whole bunch of empty arguments to the insert line. There is a lot that can go wrong with any sql statement. I would suggest breaking down the insert line into shorter statements like the following. It may not solve the problem, but will likely give you a better idea of where the problem is: -
Set objCon = Server.CreateObject("ADODB.Connection")
-
objCon.Open "Provider=SQLOLEDB;DataSource=wwww;UID=xxx;Pwd=yyy;DataBase=zzzz;"
-
set objRS = Server.CreateObject("ADODB.Recordset")
-
objRS.open "SELECT * FROM [Book_files]", objCon, adOpenDynamic, adLockOptimistic
-
-
for i = 0 to tSim_num
-
objRS.addNew
-
objRS("projID") = projID
-
response.write "projID: " & projID & "<br>" & vbNewLine
-
objRS("comment") = null
-
response.write "comment: (null)<br>" & vbNewLine
-
objRS("carType") = carType(i)
-
response.write "carType: " & carType(i) & "<br>" & vbNewLine
-
'etc
-
objRS.update
-
next
-
Like I said before, when you use just one line of code to insert, there is no telling where the problem arose, but this way should let you know where the problem is.
Let me know if this helps.
Jared
It looks like you are passing a whole bunch of empty arguments to the insert line. There is a lot that can go wrong with any sql statement. I would suggest breaking down the insert line into shorter statements like the following. It may not solve the problem, but will likely give you a better idea of where the problem is: -
Set objCon = Server.CreateObject("ADODB.Connection")
-
objCon.Open "Provider=SQLOLEDB;DataSource=wwww;UID=xxx;Pwd=yyy;DataBase=zzzz;"
-
set objRS = Server.CreateObject("ADODB.Recordset")
-
objRS.open "SELECT * FROM [Book_files]", objCon, adOpenDynamic, adLockOptimistic
-
-
for i = 0 to tSim_num
-
objRS.addNew
-
objRS("projID") = projID
-
response.write "projID: " & projID & "<br>" & vbNewLine
-
objRS("comment") = null
-
response.write "comment: (null)<br>" & vbNewLine
-
objRS("carType") = carType(i)
-
response.write "carType: " & carType(i) & "<br>" & vbNewLine
-
'etc
-
objRS.update
-
next
-
Like I said before, when you use just one line of code to insert, there is no telling where the problem arose, but this way should let you know where the problem is.
Let me know if this helps.
Jared
the prob was in the loop coz it was adding an extra insert ...so instead i did
for i = 0 to (tSim-1) and now it works !! thanks a lot for ur time anyways ....
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: paul tomlinson |
last post by:
Hi folks - i've got a windows 2000 server (SP3) i've run the IIS
lockdown tool on it and set for dynamic websites - all the static
pages within the site work ok but an ASP section has been put in...
|
by: Mark Sargent |
last post by:
Hi All,
what does the below error mean in plain English..? Cheers.
Mark Sargent.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
General error Unable to open
|
by: BrianS |
last post by:
I am receiving this error anytime I attempt to connect to
a MS access DSN. Not clue what happened to trigger this
suddenly. Any help is greatly appreciated.
|
by: M P |
last post by:
What does this mean? I am accessing an ASP page that queries Access Database
thru fileDSN. I'm using IIS 5.0 Win2K SP4
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General...
|
by: Albert |
last post by:
Hi guys, it's nice to join the forum. Can someone can help me?
After 2 years of using a program, i suddenly got this error. I tried
re-installing SQL but im still getting the message.
...
| |
by: Rajiv |
last post by:
hi all ,
i m trying to coneect to a access database Using DSN
dim rcon
set rcon = server.CreateObject("ADODB.CONNECTION")
rcon.mode = 1 ' adModeRead
rcon.ConnectionString ="DSN=report"
...
|
by: Saber |
last post by:
In VS 2005 I made a setup project for my application.
The application uses a mdb file and needs Microsoft Jet OLE DB Provider to
run on another PCs.
In Prerequisites section of Setup Property...
|
by: pericpero |
last post by:
Hi
There seem to be a number of posts already with this error message but none of them have helped me ...
I am trying to execute some dynamic SQL from an ASP form to update or delete from a...
|
by: Genken |
last post by:
Please assist in this error i have provided the source code.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
Too few parameters. Expected 1.
<%
Set objconn =...
|
by: Rheal |
last post by:
Hi
Can someone help me. My error is :
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
Data type mismatch in criteria expression.
/add.asp, line 73
my codes are
<% dim...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |