If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Get Insert error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-04, 13:21
RnQ RnQ is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
Get Insert error

Hello,
I'm Using VB6 and sql server 2000, I have this code:
Code:
Sql = "INSERT INTO table (id,name) VALUES(1,'carl')" & vbcrlf
Sql = Sql & "INSERT INTO table (id,name) VALUES(2,'pez')" & vbcrlf
Sql = Sql & "INSERT INTO table (id,name) VALUES(3,XXX)" & vbcrlf 'this line has an error
Sql = Sql & "INSERT INTO table (id,name) VALUES(4,'carl')" & vbcrlf

rs.Open Sql, SqlServerConn
if I do this on my local sql server I get an error on that line no rows are inserted into the table.
But if I run this on a remote hosting sql server I don't get the error and all the rows except the one with the error are inserted.

I can do a transaction, with that I don't get the rows inserted, but I don't get the error.
How do I get the server or the recordset to raise the error?

Any help please..
Bye
RQ.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On