473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

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 1679
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

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

Similar topics

1
by: Rolf | last post by:
Hi MS Newsgroup I am using SQL 2000 SP3 + latest hot fixes and I am editing a DTS package. When I save the package I get a SQL Server Access Violation and cannot save the package. This does not...
14
by: Roy Gourgi | last post by:
Hi, I need to store and retrieve information from a database. It looks as though there is a lot more support for SQLServer than there is for Access, correct me if I am wrong. What do I have...
2
by: Mamatha | last post by:
Hi I want to convert SQLServer database into MS-Access through ASP program.Is there any possiblity to covert?If possible please let me know and thanks in advance. Mamatha
1
by: ewehbe | last post by:
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...
38
by: kavsak | last post by:
Hi. Not sure that this is the right place to ask but here goes. I have an application based on access97 and VB6 which I need to upgrade. It has to handle up to 20 concurrent users on a Win2k...
22
by: teejayem | last post by:
Hi, I am new to programming with databases and was wanting some help. Is there any way to password protect an access database and access sent sql commands to it via vb.net code? Any help...
4
by: Rick | last post by:
I've moved code from a stage machine to the production machine, exact same code works fine on the stage machine, they are both windows 2003 servers, I'm getting a "Cannot generate SSPI context"...
6
by: squishywaffle | last post by:
This has got me somewhat stumped, so I'll throw it up here in hopes that someone has ran into this before. I'm trying to send a MIME package to Esko Backstage. I'm a bit confused as to how to send...
0
by: pinky22 | last post by:
I am calling SSIS package from a .Net windows UI. Both SSIS & .Net app are created in 2008. The SSIS package is stored in file system. When I ran .Net app I got error- The package failed to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.