469,148 Members | 1,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,148 developers. It's quick & easy.

sending a parameter from an access database to a DTS package in sqlserver

4
I am trying to call this command from an access data base through RUNAPP macro commande:

"C:\program files\microsoft sql server\80\Tools\Binn\dtsrun.exe" /S "(local)" /N "mypackage" /E /A mydate:8 = "Forms!Opensituation!Combo4"

mypackage: is the name of the dts package in sqlserver
mydate is the name of the global variable used in sql server
8 is the string type
Forms!Opensituation!Combo4: is the combo box variable in the access form Opensituation where a string is captured

Instead of getting what is in the combo box Combo4, (that is a string). in the sql server global variable mydate,
i am getting the following string "Forms!Opensituation!Combo4"

SO how could i pass a variable parameter from access to dts package in sqlserver?
Jul 10 '06 #1
1 2449
ewehbe
4

I am trying to call this command from an access data base through RUNAPP macro commande:

"C:\program files\microsoft sql server\80\Tools\Binn\dtsrun.exe" /S "(local)" /N "mypackage" /E /A mydate:8 = "Forms!Opensituation!Combo4"

mypackage: is the name of the dts package in sqlserver
mydate is the name of the global variable used in sql server
8 is the string type
Forms!Opensituation!Combo4: is the combo box variable in the access form Opensituation where a string is captured

Instead of getting what is in the combo box Combo4, (that is a string). in the sql server global variable mydate,
i am getting the following string "Forms!Opensituation!Combo4"

SO how could i pass a variable parameter from access to dts package in sqlserver?

since no one did answer me yet, I conrinue my research and found the following answer:
instead of using the macro command runapp I used the event procedure function
shell then I concatenate all the comand string in a variable that i called by the shell function and it works verry well. The codes became as follows:

dim getvar, var1
var1 = "C:\program files\microsoft sql server\80\Tools\Binn\dtsrun.exe /S (local) /N mypackage /E /A mydate:8 ="
var1 = var1 & Forms!Opensituation!Combo4.value
getvar = shell (var1)


note the following:
i keep the (") only in the beginning and the end of the first command string
i use (&) instead of (+) to concatenate the comande string
I add the (.Value) to my combo variable.

it realy works and let me reduce the execution of inserting 32000 records i a table from 2mn while using an acces insert query to 2second by doing the same thing through dts in sql server environment

bye
Jul 11 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Roy Gourgi | last post: by
2 posts views Thread by Mamatha | last post: by
4 posts views Thread by Jim Devenish | last post: by
22 posts views Thread by teejayem | last post: by
4 posts views Thread by Rick | last post: by
6 posts views Thread by squishywaffle | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.