473,231 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Microsoft OLE DB Provider for ODBC Drivers

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
Mar 14 '07 #1
2 2980
jhardman
3,406 Expert 2GB
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 .
Expand|Select|Wrap|Line Numbers
  1. for i=0 to (tSim_num)
  2. LINE 47 : 
  3. 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)&"')"
  4.     db_conn.execute(sql)
  5.     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:
Expand|Select|Wrap|Line Numbers
  1. Set objCon = Server.CreateObject("ADODB.Connection")
  2. objCon.Open "Provider=SQLOLEDB;DataSource=wwww;UID=xxx;Pwd=yyy;DataBase=zzzz;"
  3. set objRS = Server.CreateObject("ADODB.Recordset")
  4. objRS.open "SELECT * FROM [Book_files]", objCon, adOpenDynamic, adLockOptimistic
  5.  
  6. for i = 0 to tSim_num
  7.    objRS.addNew
  8.    objRS("projID") = projID
  9.    response.write "projID: " & projID & "<br>" & vbNewLine
  10.    objRS("comment") = null
  11.    response.write "comment: (null)<br>" & vbNewLine
  12.    objRS("carType") = carType(i)
  13.    response.write "carType: " & carType(i) & "<br>" & vbNewLine
  14.    'etc
  15.    objRS.update   
  16. next
  17.  
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
Mar 14 '07 #2
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:
Expand|Select|Wrap|Line Numbers
  1. Set objCon = Server.CreateObject("ADODB.Connection")
  2. objCon.Open "Provider=SQLOLEDB;DataSource=wwww;UID=xxx;Pwd=yyy;DataBase=zzzz;"
  3. set objRS = Server.CreateObject("ADODB.Recordset")
  4. objRS.open "SELECT * FROM [Book_files]", objCon, adOpenDynamic, adLockOptimistic
  5.  
  6. for i = 0 to tSim_num
  7.    objRS.addNew
  8.    objRS("projID") = projID
  9.    response.write "projID: " & projID & "<br>" & vbNewLine
  10.    objRS("comment") = null
  11.    response.write "comment: (null)<br>" & vbNewLine
  12.    objRS("carType") = carType(i)
  13.    response.write "carType: " & carType(i) & "<br>" & vbNewLine
  14.    'etc
  15.    objRS.update   
  16. next
  17.  
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 ....
Mar 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
2
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
7
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.
15
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...
1
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. ...
1
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" ...
4
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...
2
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...
0
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 =...
2
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...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.