|
-
Aug 15th, 2000, 10:12 AM
#1
Thread Starter
Hyperactive Member
Hi Folks,
I'm trying use a USERCONNECTION in VB 6 to access my SQL database. I'm not using Stored procedure, I just write the SQL code into the "User Defined SQL" part of the userconnection.
The problem is that I'm trying to insert a new record into a table (EventCause) that has 3 fields (CauseID,Faultid,FaultCause), but I keep getting an error from ODBC :-
"Attempting to insert explicit value for indetity column in table "EventCause" when IDENTITY_INSERT is set to OFF"
What does this mean??? How can I set the identity to ON (if thats the case) from my "User-Defined SQL"
User-Defined SQL
----------------
Insert Into Eventcause(CauseID,FaultID,FaultCause) VALUES (?,?,?)
N.B. The '?' are being passed from the calling statement as parameters
Thanks,
Craig.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|