Slythie
asked on
Build WHERE -> insert_fields() failed.
Dear experts,
i have a vb6 program with mysql database. i have this module to update the database. I have it up and running before but today whenever i run it, i encounter this [MySQL][ODBC5.1 Driver][mysqld-5.1.33-comm unity]Buil d WHERE -> insert_fields() failed.
any ideas what might have caused this problem experts? thank you for the input.
i have a vb6 program with mysql database. i have this module to update the database. I have it up and running before but today whenever i run it, i encounter this [MySQL][ODBC5.1 Driver][mysqld-5.1.33-comm
any ideas what might have caused this problem experts? thank you for the input.
MySQL with VB! A marriage made in hell. Please post the code that generates the sql, the schema of the db table, and if the sql statement is dynamic, please post the final sql statement sent to odbc_query.
ASKER
The code in VB is as follows:
Set ac = New ADODB.Connection
Set ar = New ADODB.Recordset
ac.Open "dsn=pptkis"
ar.Open "select * from asuransi where asuransi_no = '" & ListView1.ListItems(ListVi ew1.Select edItem.Ind ex).Text & "'", ac, adOpenDynamic, adLockOptimistic
If Not ar.EOF Then
ar!asuransi_tki_name = Text5
ar.Update
ar.Close
end if
just a few days ago, this code was working just fine
in the table asuransi, it contains the following fields:
- asuransi_no [varchar(50)]
- asuransi_tki_name [varchar(50)] <---- this is the field needs to be updated
- asuransi_cabang_kode [varchar(3)]
Set ac = New ADODB.Connection
Set ar = New ADODB.Recordset
ac.Open "dsn=pptkis"
ar.Open "select * from asuransi where asuransi_no = '" & ListView1.ListItems(ListVi
If Not ar.EOF Then
ar!asuransi_tki_name = Text5
ar.Update
ar.Close
end if
just a few days ago, this code was working just fine
in the table asuransi, it contains the following fields:
- asuransi_no [varchar(50)]
- asuransi_tki_name [varchar(50)] <---- this is the field needs to be updated
- asuransi_cabang_kode [varchar(3)]
ASKER
nvm about this problem... I found out that it was my stupid mistakes, trying to update one field but there are some other "NOT NULL" fields and they require values.. thx for trying to help v2Media.. =)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.