dbTalk Databases Forums  

Change DSN Source Path

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Change DSN Source Path in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul
 
Posts: n/a

Default Change DSN Source Path - 01-05-2005 , 03:21 PM







Is there an easy way to change the source path for a DSN using the DTS
object model?

I have a DTS to import DBFs into SQL. Because I want to do some complex
join queries with the DBFs while importing I cannot use the native dBase
connection object. I am using a DSN with the Visual Fox Pro Driver.

The source path changes on a daily basis. The path name is based on date.
Renaming the path to something fixed is not an option due to parrallel
processes. Copying the data to a fixed path is not an option due to the
volume of data. I need to dynamically change the source path of the DSN.

I came across VBscript code to change the source path of a system DSN by
creating a reference to a shell script object and playing around with the
registry. I could alternatively use file IO code to update a file DSN. What
I am hoping for is an easy way to change the source path of the DSN using the
DTS object model.

Is this possible?

Thanks.

Paul


Reply With Quote
  #2  
Old   
JFB
 
Posts: n/a

Default Re: Change DSN Source Path - 01-05-2005 , 10:10 PM






Here is an example where you can get the idea.
http://www.sqldts.com/default.aspx?200
Rgds
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote

Quote:
Is there an easy way to change the source path for a DSN using the DTS
object model?

I have a DTS to import DBFs into SQL. Because I want to do some complex
join queries with the DBFs while importing I cannot use the native dBase
connection object. I am using a DSN with the Visual Fox Pro Driver.

The source path changes on a daily basis. The path name is based on date.
Renaming the path to something fixed is not an option due to parrallel
processes. Copying the data to a fixed path is not an option due to the
volume of data. I need to dynamically change the source path of the DSN.

I came across VBscript code to change the source path of a system DSN by
creating a reference to a shell script object and playing around with the
registry. I could alternatively use file IO code to update a file DSN.
What
I am hoping for is an easy way to change the source path of the DSN using
the
DTS object model.

Is this possible?

Thanks.

Paul




Reply With Quote
  #3  
Old   
Paul
 
Posts: n/a

Default Re: Change DSN Source Path - 01-06-2005 , 07:39 AM




Thanks for the reply. I have seen and used that code before. However it
does not work on an ODBC DSN connection object in DTS. The DataSource
property simply changes the name of the DSN you are using. Any other ideas?

Thanks again.

Paul


"JFB" wrote:

Quote:
Here is an example where you can get the idea.
http://www.sqldts.com/default.aspx?200
Rgds
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote in message
news:6AA65B2C-8166-4B4C-B0ED-864D1DF33475 (AT) microsoft (DOT) com...

Is there an easy way to change the source path for a DSN using the DTS
object model?

I have a DTS to import DBFs into SQL. Because I want to do some complex
join queries with the DBFs while importing I cannot use the native dBase
connection object. I am using a DSN with the Visual Fox Pro Driver.

The source path changes on a daily basis. The path name is based on date.
Renaming the path to something fixed is not an option due to parrallel
processes. Copying the data to a fixed path is not an option due to the
volume of data. I need to dynamically change the source path of the DSN.

I came across VBscript code to change the source path of a system DSN by
creating a reference to a shell script object and playing around with the
registry. I could alternatively use file IO code to update a file DSN.
What
I am hoping for is an easy way to change the source path of the DSN using
the
DTS object model.

Is this possible?

Thanks.

Paul





Reply With Quote
  #4  
Old   
JFB
 
Posts: n/a

Default Re: Change DSN Source Path - 01-06-2005 , 09:38 AM



Ok Paul maybe the easy way is to use UDL connection. It's easy to replace
the file...
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for the reply. I have seen and used that code before. However it
does not work on an ODBC DSN connection object in DTS. The DataSource
property simply changes the name of the DSN you are using. Any other
ideas?

Thanks again.

Paul


"JFB" wrote:

Here is an example where you can get the idea.
http://www.sqldts.com/default.aspx?200
Rgds
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote in message
news:6AA65B2C-8166-4B4C-B0ED-864D1DF33475 (AT) microsoft (DOT) com...

Is there an easy way to change the source path for a DSN using the DTS
object model?

I have a DTS to import DBFs into SQL. Because I want to do some
complex
join queries with the DBFs while importing I cannot use the native
dBase
connection object. I am using a DSN with the Visual Fox Pro Driver.

The source path changes on a daily basis. The path name is based on
date.
Renaming the path to something fixed is not an option due to parrallel
processes. Copying the data to a fixed path is not an option due to
the
volume of data. I need to dynamically change the source path of the
DSN.

I came across VBscript code to change the source path of a system DSN
by
creating a reference to a shell script object and playing around with
the
registry. I could alternatively use file IO code to update a file DSN.
What
I am hoping for is an easy way to change the source path of the DSN
using
the
DTS object model.

Is this possible?

Thanks.

Paul







Reply With Quote
  #5  
Old   
Paul
 
Posts: n/a

Default Re: Change DSN Source Path - 01-06-2005 , 02:55 PM




Excellent. That looks like what I need. I never used UDL connections
before.

Thanks for the help!

Paul

"JFB" wrote:

Quote:
Ok Paul maybe the easy way is to use UDL connection. It's easy to replace
the file...
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote in message
news:1BB98EFC-11DD-42EF-9060-A5FFB88ADF1B (AT) microsoft (DOT) com...

Thanks for the reply. I have seen and used that code before. However it
does not work on an ODBC DSN connection object in DTS. The DataSource
property simply changes the name of the DSN you are using. Any other
ideas?

Thanks again.

Paul


"JFB" wrote:

Here is an example where you can get the idea.
http://www.sqldts.com/default.aspx?200
Rgds
JFB

"Paul" <Paul (AT) discussions (DOT) microsoft.com> wrote in message
news:6AA65B2C-8166-4B4C-B0ED-864D1DF33475 (AT) microsoft (DOT) com...

Is there an easy way to change the source path for a DSN using the DTS
object model?

I have a DTS to import DBFs into SQL. Because I want to do some
complex
join queries with the DBFs while importing I cannot use the native
dBase
connection object. I am using a DSN with the Visual Fox Pro Driver.

The source path changes on a daily basis. The path name is based on
date.
Renaming the path to something fixed is not an option due to parrallel
processes. Copying the data to a fixed path is not an option due to
the
volume of data. I need to dynamically change the source path of the
DSN.

I came across VBscript code to change the source path of a system DSN
by
creating a reference to a shell script object and playing around with
the
registry. I could alternatively use file IO code to update a file DSN.
What
I am hoping for is an easy way to change the source path of the DSN
using
the
DTS object model.

Is this possible?

Thanks.

Paul








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.