July 8, 2008 at 9:23 am
Access 101 question - I need to be able to insert a row into my SQL 2005 DB using values collected from my form.
So far, I've been able to create a form w/ a cmd Button which when clicked, successfully fires an onClick event which in turn successfully connects to my SQL 2005 DB and successfully executes a Stored Proc called sp_MyProc:
Set ldb = wsMainWorkSpace.OpenDatabase("", False, False, strConnect)
lssql = "EXEC sp_MyProc"
ldb.Execute lssql, dbSQLPassThrough
MsgBox ("Successful Deletion of Result Sets!")
(this is a basic proc which contains a hard coded: INSERT INTO MyDB.dbo.MyTable (EMP_ID, EMP_NAME) VALUES (1, 'John Smith')
Now - I'd like to understand how I can pass values, collected from my Access 2003 form, as parms to feed to the stored proc for INSERT purposes.
Do I simply extend the lssql parameter above to included concatenations of variable names? (a simple example would be greatly appreciated)
August 1, 2008 at 8:35 am
There is another thread in this forum with details on how to do this - to save rekeying the advice there I will just post the link!
http://www.sqlservercentral.com/Forums/Topic541274-131-1.aspx
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply