Bad Directory - DTS - Global Variables


I am trying to set Global Variable that will open a txt file and import the data into a sql table.

I am currently using the sample I found at sqldts.com (Looping, Importing and Archiving).
When I set the variable for filename = dbo.cadfilepath.filename, I get a Bad Directory error.
My filename data is stored in another table - I am looking for the best approach to calling the filename from the table = cadfilepath and opening the actual text file and importing the data into my project table.

ie.
Table = CADFilepath(pathname, projectnum)
Pathname ProjectNum
\\Seasc-Shared\Spln\Shared\Forecast\00000-000.txt 00000-000
\\Seasc-Shared\Spln\Shared\Forecast\00000-001.txt 00000-001
\\Seasc-Shared\Spln\Shared\Forecast\00000-002.txt 00000-002

I want to access the info in CADFIlePath and then open the first record's text file and import this data into my Project Table, then repeat the process until .EOF.

I know this sounds confusing and I can email you my documentation - since this website does not allow for attachments.

Any assistances is greatly appreciated.

Karen
Posted On: Saturday 10th of November 2012 05:09:52 AM Total Views:  52
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




Local variables in a view

. I need to set the value of a column from the value of another column in a view, like so: create view vBoatMetrics as select PK_BID, CASE when(var1 > 1) then A else B end as Column1Val CASE when(var2 > 1) then C else D end as Column2Val This part works fine, but when I try to: declare @Variable float set @Variable = (Column1Val*Column2Val), Column3Val = @Variable I get errors. Can someone please show me how to create a local variable in a view so I can carry the value throught the view I have several calculations in a view that need to be based on the outcomes of other calculations and so forth. I would GREATLY appreciate some help! MANY TIA, Brandon
VIEWS ON THIS POST

104

Posted on:

Tuesday 20th November 2012
View Replies!

I/O error (bad page ID) detected during read at offset 0x0000000f3e4000

Can anyone help me with this error Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC SQL Server Driver][SQL Server]I/O error (bad page ID) detected during read at offset 0x0000000f3e4000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\RVHS_database.mdf'. What should i do to recover my database Please help me out
VIEWS ON THIS POST

178

Posted on:

Tuesday 20th November 2012
View Replies!

Job failing, but dts package is successful

I have a dts package that is scheduled as a job. This job is created under the admin ownership. The job is failing even when I log into the server as an admin and start(execute) the job. If I execute the dts package itself it runs successfully. Any ideas why this may be
VIEWS ON THIS POST

103

Posted on:

Tuesday 20th November 2012
View Replies!

storesprocedure variables

Hi! I have a storedprocedure question. Can a use a parameter as a SQL-Command. I tried something like this with out success. Code: @sortorder = 'DESC' SELECT * FROM tblUsers ORDER BY usrName @sortorder
VIEWS ON THIS POST

157

Posted on:

Monday 26th November 2012
View Replies!