pingLeeQuan
Programmer
I am stuck in trying to update/insert a record in to the table.
I have 4 visual components on my form
Tquery, tUpdateQuery, Ttable, and tDataSet.
The "DataSet" in the property option of the DataSet is set to the query's name
The "UpdateObject" of the query is set to the tUpdateSql
The Tquery is "Select * from table1"
The TUpdateSQL has an insert statement similar to the following one
Insert into tInternalHeader
(
TenantID,
PaymentDate,
AmountPaid,
UnitID,
ProjectID,
InternalHeaderID_FK,
BatchNumber,
ProcessDateTime,
ExportedDateTime,
ExportedUserID_FK,
ProcessUserID_FK,
RecordIndicator
)
values
(
:cusID,
aymentDate,
:AmountPaid,
:UnitID,
rojectID,
:InternalHeaderID_FK,
:BatchNumber,
:NOW(),
:ExportedUserID_FK,
rocessedUserID_FK,
:'D'
)
And when I do the following in my main form:
qryExternalHeader->Open();
qryExternalHeader->FieldByName("UserName"
->AsString = "zozozozozozo";;
qryExternalHeader->Post();
I get
"Field UserName is of an unknown type. Process stopped".
I tried to substitute other fields but I still get the same message.
I checked the fields on MYSQL and on BDE. They all exist and of type VARCHAR, and BINARYVARCHAR....
Can anyone please help me with this one?
Thanks lots in advance...
--quan
I have 4 visual components on my form
Tquery, tUpdateQuery, Ttable, and tDataSet.
The "DataSet" in the property option of the DataSet is set to the query's name
The "UpdateObject" of the query is set to the tUpdateSql
The Tquery is "Select * from table1"
The TUpdateSQL has an insert statement similar to the following one
Insert into tInternalHeader
(
TenantID,
PaymentDate,
AmountPaid,
UnitID,
ProjectID,
InternalHeaderID_FK,
BatchNumber,
ProcessDateTime,
ExportedDateTime,
ExportedUserID_FK,
ProcessUserID_FK,
RecordIndicator
)
values
(
:cusID,
:AmountPaid,
:UnitID,
:InternalHeaderID_FK,
:BatchNumber,
:NOW(),
:ExportedUserID_FK,
:'D'
)
And when I do the following in my main form:
qryExternalHeader->Open();
qryExternalHeader->FieldByName("UserName"
qryExternalHeader->Post();
I get
"Field UserName is of an unknown type. Process stopped".
I tried to substitute other fields but I still get the same message.
I checked the fields on MYSQL and on BDE. They all exist and of type VARCHAR, and BINARYVARCHAR....
Can anyone please help me with this one?
Thanks lots in advance...
--quan