Home > database >  Values, please use the Insert Into () () to Insert data problem!!
Values, please use the Insert Into () () to Insert data problem!!

Time:10-18

The couple for help!
[cj_pc established using PB ASA, bring their own database tables, primary keys for PC, two em_1 and em_2 is added in the interface is used to display the system date/time, in addition to the entry date and time is the system automatically generated of the input, the other is user input, but can't update to the database table, Insert Into () values () is valid or must be the entire line inserting data can choose a value to be inserted to just go? Please tell us the great god, thank you!!!!
Long wdate wtime//define wdate (date) of the input, wtime (entry time) can be inserted into the cj_pc table
Wdate=long (em_1. Text)
Wtime=long (em_1. Text)

CodePudding user response:

Table set on a primary key or unique index, to set up the data window, and then you build data window is not updated attributes, cannot update successful, after set up the primary key to build the data window is updated properties

CodePudding user response:

A great god, has set the primary key PC and data window dw_1, in the open () event also add
Dw_1. Settransobject (sqlca)
Dw_1. Retrieve ()
In the save button cb_1 clicked event, I want to achieve the goal of em_1 and em_2 inserted into a table in the cj_pc (em_1 said date, em_2 said time), the other input by the user, only the date and time is the system automatically generated, thank you

CodePudding user response:

First of all you datawindow set update properties, to update a table; As for you need em_1, em_2 the value of the converted into corresponding data types in the table, you write the update in the program code

CodePudding user response:

Directly on the DW controls to edit all fields through the update attribute update DW, DW will automatically handle insert or update