All i want to does is to be able to get data that i have entered into a text box or listbox and store it into an access databse, how do i go about achieving this? i can't seem to figure it out!!! PLEASE HELP IF U CAN!!!
Function SaveThis(This as STring) AS boolean dim rst as adodb.command
on error goto eHand SaveThis = false
set rst= new adodb.command rst.activeconnection = "Any valid ado connection string here" rst.commandtype = adtext <- I don't remember the exact but vb will show you select text. rst.commandtext = "insert into mytable (myfiels) values ('" & this & "') where id = 5" '<-use another var or param rem or maybe "update mytable set myfiel = '" & this & "'" rem you can use others like .connectiontimeout, etc. rst.execute ' Still you can put commandtext here
Savethis = true exit function
eHand msgbox err.description End Function
The sql structure depends on your DBMS.
==================== : All i want to does is to be able to get data that i have entered into a text box or listbox and store it into an access databse, how do i go about achieving this? i can't seem to figure it out!!! PLEASE HELP IF U CAN!!! : :
Comments
Function SaveThis(This as STring) AS boolean
dim rst as adodb.command
on error goto eHand
SaveThis = false
set rst= new adodb.command
rst.activeconnection = "Any valid ado connection string here"
rst.commandtype = adtext <- I don't remember the exact but vb will show you select text.
rst.commandtext = "insert into mytable (myfiels) values ('" & this & "') where id = 5" '<-use another var or param
rem or maybe "update mytable set myfiel = '" & this & "'"
rem you can use others like .connectiontimeout, etc.
rst.execute ' Still you can put commandtext here
Savethis = true
exit function
eHand
msgbox err.description
End Function
The sql structure depends on your DBMS.
====================
: All i want to does is to be able to get data that i have entered into a text box or listbox and store it into an access databse, how do i go about achieving this? i can't seem to figure it out!!! PLEASE HELP IF U CAN!!!
:
: