Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing of values form a textbox and combobox
Message
 
To
17/11/1998 23:54:40
Victor Lapid
Phil. Long Distance Tel. Co.
Manila, Philippines
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00158628
Message ID:
00158688
Views:
14
>How do I add a record on MSACCESS table getting the values from a texbox or combobox using the INSERT INTO-SQL command?

Hi Victor,

1. First of all you have to define an ODBC data source for the Access MDB you want to update using 32-bit ODBC admin in Control Panel.
2. Issue lnhandle = SQLCONNECT() from command window.
3. Locate the ODBC Data Source you have created. This will return connection handle in lnhandle varibale.
4. Use lnhandle this varible in SQLEXECUTE() func as follows.

=SQLEXECUTE(lnhandle,"insert into mytable value (......)")

You can do the same thing in the form using the value of ComboBox and TextBox.

lcval = Thisform.txttry.Value
=SQLEXECUTE(lnhandle,"insert into mytable value (?lcval,.....)")

Bye
Jayesh
- Jayesh
Previous
Reply
Map
View

Click here to load this message in the networking platform