> > Hello dear experts....
> > I am tired....
> >
> > I have the following code and have granted all privileges to the user "root", but after executing the command
> > k=SQLEXEC( ein_wert,"insert into tst (nam,famil) values ('jack', 'mueller')")
> > i brow the table and see that no record are added to the table.
> > I try using append blank, the records are created, but after quitting and restating the foxpro, the records are lost !!!!
> >
> > PUBLIC ein_wert
> > SET MULTILOCKS ON
> > ein_wert=SQLSTRINGCONNECT('dsn=erstes_DS; uid=root;pwd=einkennwort')
> > lc=CREATEOBJECT("Cursoradapter")
> > k=SQLEXEC(ein_wert,"use first_db")
> > lc.Alias ="javan"
> > lc.DataSourceType ="ODBC"
> > lc.DataSource = ein_wert
> > lc.Tables = "tst"
> > lc.WhereType = 3
> > lc.KeyFieldList = "nam"
> > lc.SelectCmd = " select * from tst "
> > lc.allowinsert = .t.
> > aaa=lc.CursorFill()
> > xxx= CURSORSETPROP('WhereType',3,"javan")
> > xxx= CURSORSETPROP('Tables',"tst","javan")
> > xxx= CURSORSETPROP('KeyfieldList',"nam","javan")
> > xxx= CURSORSETPROP('UpdateType',2,"javan")
> > xxx= CURSORSETPROP("Buffering", 5, "javan")
> > xxx= cursorsetprop("SendUpdates", .t., "javan")
> > xxx =cursorsetprop("BatchUpdateCount", 5, "javan")
> > xxx =cursorsetprop("UpdateNameList", "", "javan")
> > xxx =cursorsetprop("UpdatableFieldList", "", "javan")
> > xxx =cursorsetprop("UpdateNameList", "", "javan")
> > k=SQLEXEC( ein_wert,"insert into tst (nam,famil) values ('jack', 'mueller')")
> > SELECT javan
> > lc.CURSORREFRESH()
> > fffff = TableUpdate( 0, .F., "javan" )
> > dd=SQLCOMMIT(lc.DATASOURCE)
> > dd=SQLDISCONNECT( lc.DATASOURCE )
> > lc = NULL
> > CLEAR ALL
> > FLUSH FORCE
> > RETURN
> After
> k=SQLEXEC( ein_wert,"insert into tst (nam,famil) values ('jack', 'mueller')")
>
> check the value of k. If it is less than 0, use AERROR to see why the update did not take place.
>
> Why are you using SendUpdates and then setting UpdatableFieldList and UpdateNameList to blank.
>
> Regards
> Tushar
Hello,
the value of k ist = 1.
What should i insert in SendUpdates, UpdatableFieldList and UpdateNameList instead of blank ????
Thx