Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb script help on an integration

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
0
0
CA
I have 2 sources that are sql datasources. I am trying to have a script that prompts a user for a Batch ID and that prompt will then restrict the source data to that Batch ID. I have found the vb script that does this, but it doesn't seem to work if I have more than one source.

Here is what I have so far:

Dim Input
Input = InputBox("Enter a Batch ID to Import","Batch")
Query.AdditionalCriteria = "[Source1.Batch] = '"+Input+"'"

Batch is the column name in Source1.
 
I have this script in the Before integration:


dBatch = InputBox("Please enter a Batch ID to Import.")
SetVariable "dBatch", dBatch

I have this one setup in the Before Query on my primary source

dBatch = GetVariable("dBatch")

Query.AdditionalCriteria = "Batch=" & dBatch

The error I'm getting is invalid column name 'xx' where xx is the Batch ID I've entered.
 
Have you enclosed the batch in single quotes...

Query.AdditionalCriteria = "Batch='" & dBatch & "' "




An expert is one who knows more and more about less and less until eventually he knows absolutely everything about nothing.
 
Have you ever tried to import the data directly into the database backend. It runs much faster and you can write a frontend in .Net that will allow you to select a specific batch very easy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top