Error When Updating via Datagrid
hi all
i got this code that populate my datagrid
VB Code:
sSQL = "SELECT [Artikel], [HPP], [HPP_baru] FROM barang"
rsBrg.CursorLocation = adUseClient
rsBrg.Open sSQL, Conn, adOpenDynamic, adLockOptimistic
Set dgBarang.DataSource = rsBrg
dgBarang.Refresh
i set the AllowUpdate properties for the Datagrid to TRUE
when i changed the first column(Artikel) which is the PK, it went smooth..but when i changed the 2nd and 3rd column, an error raised
Quote:
Row cannot be located for updating. Some values may have been changed since it was last read
anyone have any clues?
PS : the database is located at my local hard drive (for testing purpose), and the value doesn't changed by anyone
thanks
Re: Error When Updating via Datagrid
Have you tried using adUseServer?
Re: Error When Updating via Datagrid
thx dee-u
adUseServer can't work when u want to populate Datagrid..it need 'Bookmarkable' which is from adUseClient
1 Attachment(s)
Re: Error When Updating via Datagrid
Take a look at the attachment, it's working...
Re: Error When Updating via Datagrid
yes it can work from ur attachment..but i can't make it to work with mine
huaa..why..? :(
all i change without error just the PK Column :confused:
the code is pratically the same
thx for the attachment ;)
Re: Error When Updating via Datagrid
Try using adOpenStatic...
Re: Error When Updating via Datagrid
already try that..still can't work
Re: Error When Updating via Datagrid
Try comparing the code in the attachment with your codes...
Re: Error When Updating via Datagrid
figure it out..
this because the datatype for the HPP, HPP_baru is Decimal
if i changed it to Long Int..it goes smooth..
have a clue how to do it via datagrid? otherwise i will 'force' using UPDATE query directly :))
very22 annoying issue
Re: Error When Updating via Datagrid
Well, I changed the field type of my example to decimal and still no issues...
Re: Error When Updating via Datagrid
try change the scale to 2