|
-
April 16th, 2001, 11:53 AM
#1
Why am I getting this error message - "-2147467259 cannot insert an empty row...."
I am getting this message when loading a form connected to a FoxPro6 table. The table has data in it, I told it to go to the last recordset and add a new one when the form loads.
I guess this is a cursor engine error?
Below is the full error message I get
"-2147467259. Cannot insert an empty row - must have at least one column value set. MS Cursor Engine"
Any ideas?
Thanks!
"There are no stupid questions, but there are a lot of inquisitive idiots."
-
April 16th, 2001, 02:39 PM
#2
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
I would include some code here (make sure to show the cursortype, cursorlocation, and locktype).
Is it possible that you are doing an update of the new record before you fill in the data?
thanx/good luck,
adam
thanx/good luck
-
April 16th, 2001, 02:55 PM
#3
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
I'm pretty sure I'm not trying to make any updates of the new record...
the cursortype, cursorlocation and locktype are not specified in my code - they are set in the form (using the ADODC properties window)
Here what my code looks like -
private Sub Form_Load()
on error GoTo err_FormLoad
'start-up procedures; fills in date, time and supq agent id
frmSupQ.Show
frmSupQ.SetFocus
ado_FxP_SupQ.Recordset.MoveLast
ado_FxP_SupQ.Recordset.AddNew
txtDate.Text = date
txtStart.Text = Format$(time, "hh:mm:ss")
txtEnd.Text = ""
txtAgentID_SupQ.Text = frmLogin.txtAgentID.Text
txtAgentID_Xfer.SetFocus
me.Refresh
Exit Sub
err_FormLoad:
MsgBox Err.Number & Chr(10) & Err.Description & Chr(10) & Err.Source
resume next
End Sub
Thanks for the help!
"There are no stupid questions, but there are a lot of inquisitive idiots."
-
April 16th, 2001, 03:05 PM
#4
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
Try to add line at the end
ado_FxP_SupQ.Recordset.Update
Iouri Boutchkine
[email protected]
-
April 16th, 2001, 03:17 PM
#5
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
the problem is i'm not trying to update a record. this is for a form_load statement where I am trying to add a new record so the user doesn't see any previous records when the form first loads. The error I am getting is related to the cursor engine, but I can figure out why? How is telling the form to update the current record going to help?
Thanks,
AD
"There are no stupid questions, but there are a lot of inquisitive idiots."
-
April 16th, 2001, 03:32 PM
#6
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
Where are you trying to add record. It can be either a database or disconnected recordset. In both cases yoou need this statement
rs.AddNew
....
rs.Update
VB has the same db engine as Access. The statement AddNew creates an emty line at the end of the recordset. You can save this line either moving to the next record or by Update statement. I think that this is causing your problem
Iouri Boutchkine
[email protected]
-
April 16th, 2001, 04:34 PM
#7
Re: Why am I getting this error message - "-2147467259 cannot insert an empty row...."
Thanks - I'll try that.
:-)
AD
"There are no stupid questions, but there are a lot of inquisitive idiots."
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
|