Cannot Create Insert command


Author
Message
Michael Reese
Michael Reese
StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)StrataFrame User (403 reputation)
Group: StrataFrame Users
Posts: 235, Visits: 1.6K
I am getting an error adding a record to a table that does not have a primary key. The message states that I cannot insert a command because PrimaryKeyisAutoincremented = true and the PrimaryKeyField is not a valid auro-increment data type.

The table does not have a Primary Key or autoincrementing primary key set to Auto increment.

Any Ideas?

Sample code below.

                                '-- Create a new record
                                .NewRow()
                                'Save Log Record
                                LocHL7Data.MessageID = System.Guid.NewGuid.ToString() 'Loc_PID_SEG_BO.MessageID
                                'LocHL7Data.MessageSize = oMsg.
                                LocHL7Data.VendorVersion = oMsg.VendorVersion
                                LocHL7Data.VendorName = oMsg.VendorName
                                LocHL7Data.MsgControl = sCrlID
                                LocHL7Data.PartnerAPP = ""
                                LocHL7Data.DateLoaded = System.DateTime.Now.ToString
                                LocHL7Data.HL7Message = oMsg.HL7
                                LocHL7Data.SegmentCount = oMsg.SegmentCount
                                LocHL7Data.MsgType = sMsgType1


                                '-- Save the record
                                If .Save() <> MicroFour.StrataFrame.Data.SaveUndoResult.Success Then
                                    MsgBox("Save Failed...")
                                End If
                            End With

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Michael Reese - 11 Years Ago
StrataFrame Team - 11 Years Ago
Michael Reese - 11 Years Ago
                 Hrm. What is the exception that it throws?
StrataFrame Team - 11 Years Ago
Edhy Rijo - 11 Years Ago
                         Thanks, I was looking for that in the BO properties but could not find...
Michael Reese - 11 Years Ago
                             That's correct. StrataFrame requires that each table have a...
StrataFrame Team - 11 Years Ago
                                 Thanks Ben, I guess I could but it will take a lot of work. I have...
Michael Reese - 11 Years Ago
                                     HL7 you probably never update the records. If you delete an entire...
StrataFrame Team - 11 Years Ago
                                         Thanks , I'll give is a shot. I want to do as much as I can through...
Michael Reese - 11 Years Ago
                                             Hi Michael, If you are parsing millions of record in the BO and then...
Edhy Rijo - 11 Years Ago
                                                 Good call, Edhy. A bulk insert into SQL is always the fastest way to...
StrataFrame Team - 11 Years Ago
Michael Reese - 11 Years Ago
             Mi Michael, Ben, You are welcome.
Edhy Rijo - 11 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search