From: Mark A. Sam on
I thought I had it solved and that it ran, but I am getting the error again.

error 3155: ODBC--insert on a linked table 'Order Entry ST Products' failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Explicit value must be
specified for identity column in table 'Order Entry ST Products' when
IDENTITY_INSERT is set to ON. (#545)

This is the eqivelant of an Autonumber field. Shouldn't I expect it to
number autmatically?

Here is the code snippet:

strSQL = "INSERT INTO [Order Entry ST Products] ( ordID, detItem, detQty,
detProdCode, detProdDescription, detProdNotation, detPrice, detTax, detExt,
DetProdLocation ) " & _
"SELECT getnewnum() AS ordID, [Order Entry ST
Products].detItem, [Order Entry ST Products].detQty, [Order Entry ST
Products].detProdCode, " & _
"[Order Entry ST Products].detProdDescription, [Order Entry ST
Products].detProdNotation, [Order Entry ST Products].detPrice, [Order Entry
ST Products].detTax, " & _
"[Order Entry ST Products].detExt, [Order Entry ST
Products].DetProdLocation " & _
"From [Order Entry ST Products] " & _
"WHERE ((([Order Entry ST Products].ordID)=" & SetpubOrdID() &
"));"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL, dbSeeChanges
DoCmd.SetWarnings True


I also tried:

CurrentDb.Execute "CopyRecordPart2", dbSeeChanges
with an Insert Failed error.

The query is equivelant to the SQl above.



From: Mark A. Sam on
Now its working.....


 | 
Pages: 1
Prev: Resolved
Next: Web based news browser