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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can I only set global vars to string?

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I'm trying to create a global variable in my dts, and it only lets me create strings. I am working on a tutorial here:

It tells me to create an output parameter of type other, but then SQL will not let me save the package. I have a query that will only accepts parameters of type int, and the dts tells me it can not convert from type BSTR to type INT.

Anyone else have this?

I am working with SQL Server 2000, and SP3.
 
More information:

I am working with SQL Server 2000, and SP3, and I'm trying to create a global variable in my dts, and it only lets me create strings.

I even tried opening an empty DTS package and creating a variable names Gary. I choose int, and it gave me an error saying "Could not convert variable Gary from type BSTR to type int."

I am tearing my hair out over this.

 
If you set the value to something other then blank, then you don't get that message.

But what if it's other??? It will not let you enter a value for it. My other type is a recordset coming from my sql task.
 
How and where are you creating this parameter?

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
in the DTS manager. I used a db connection, then a textfile connection. Then I used a transform data task. In there I put a query. Then I added parameters to it. I had to create 2 global parms. I for input and 1 for output. The input was easy: an integer, and I defaulted it to 1. The output one had to be a recordset. I named it myRS, and tried to set it as type <other>, since it was a recordset.
DTS would not let me set anything except a string unless I gave it a default in the right value column. It will not let me put anything in there if it's an <other> type.

What can I do? The tutorial tells me I can do this. The recordset was to be used by an activex script for processing, but then I found the textfile output, but now I'd like to find out why I can not do this.

 
Anyone???? Any information would be helpfull...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top