Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 ConnectionProperties ?

Author  Topic 

grajee
Starting Member

7 Posts

Posted - 2000-12-19 : 14:39:15
Hi,

I was taking a look at the DTS VB code that the system generates and
got this doubt. I have not programmed in VB, but I know that soon I
will have to do lot of programming since I'm moving over to OLAP.

What does ConnectionProperties mean ?. For example the Data Source,
"Region.txt", is set twice, once in the connectionProperties and then
in the oConnection.DataSource. Why ?. Is there any purpose ?.

Also when I commented the "oConnection.ConnectionProperties("Data Source") = "Region.txt"" line, it works fine. Any reason ?

Whereas, if I comment out "oConnection.ConnectionProperties("File Format") = 1", then the package does not generates the output file.

Thanks,
gopi


oConnection.ConnectionProperties("Data Source") = "Region.txt"
oConnection.ConnectionProperties("Mode") = 3
oConnection.ConnectionProperties("Row Delimiter") = vbCrLf
oConnection.ConnectionProperties("File Format") = 1
oConnection.ConnectionProperties("Column Lengths") = "4,50"
oConnection.ConnectionProperties("Column Delimiter") = ","
oConnection.ConnectionProperties("File Type") = 1
oConnection.ConnectionProperties("Skip Rows") = 0
oConnection.ConnectionProperties("Text Qualifier") = """"
oConnection.ConnectionProperties("First Row Column Name") = True
oConnection.ConnectionProperties("Column Names")= "RegionID,RDescription"
oConnection.ConnectionProperties("Number of Column") = 2
oConnection.ConnectionProperties("Text Qualifier Col Mask: 0=no, 1=yes, e.g. 0101") = "01"
oConnection.ConnectionProperties("Max characters per delimited column") = 255
oConnection.ConnectionProperties("Blob Col Mask: 0=no, 1=yes, e.g. 0101") = "00"


oConnection.Name = "Text File (Destination)"
oConnection.ID = 2
oConnection.Reusable = True
oConnection.ConnectImmediate = False
oConnection.DataSource = "Region.txt"
oConnection.ConnectionTimeout = 60
oConnection.UseTrustedConnection = False
oConnection.UseDSL = False
   

- Advertisement -