Stellen Sie eine Frage
Schnellzugriff
- Forenhomepage
- Teilnehmer suchen
- FAQ
Ähnliche Threads durchsuchen
- Remove From My Forums
Fragensteller
Archived Forums 361-380
>
SQL Server Integration Services
Frage
-
Anmelden
In the context of creating a new connection manager for OLE DB, but pointing it at a .txt file, I'm getting "The ConnectionString property has not been initialized" when I try to test the connection.
I've got "Named Connection String" pointing to a file named "Connect.txt" which looks like this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\SFIM_SSIS\MS Tutorial\ID370 SFIM TAXEXT.txt;Extended Properties="text;HDR=Yes;FMT=Fixed";
What does "not intialized" mean in this context?
Is "The ConnectionString property" the same as what I typed into "Named ConnectionString"?
If so, what does it take to get it "initialized"?
Or is the message just trying to tell me that my connection string is invalid?
Freitag, 31. Juli 2009 15:38
Alle Antworten
- 1
Anmelden
Correct me if i am wrong
You are using a TXT file? if you are then you are using a FLAT FILE Connection , not a Excel Connection manager
if so then you only need to point the file name and folder you dont need the ...
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\SFIM_SSIS\MS Tutorial\ID370 SFIM TAXEXT.txt;Extended Properties="text;HDR=Yes;FMT=Fixed";
that is for excelfor text you need connection string to be
H:\SFIM_SSIS\MS Tutorial\ID370 SFIM TAXEXT.txt
that'sallam i right?
Sincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 15:44
- 1
Anmelden
I know that you can use other Connection object to connect to verious file format but for text the FlatFile is better and easier
thats just my thoughtSincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 15:54
- 1
Anmelden
try
http://www.connectionstrings.com/textfileProvider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited";
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Fixed";
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited";
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;Sincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
- Als Antwort vorgeschlagen Nik - Shahriar Nikkhah Freitag, 31. Juli 2009 16:25
Freitag, 31. Juli 2009 16:25
-
Anmelden
I know that you can use other Connection object to connect to verious file format but for text the FlatFile is better and easier...
Problem is that FlatFile requires one to manually specify field names/column boundries - and that gets really old really fast for, say, a 2,100 character wide file with a couple of hundred columns. Especially when somebody throws a new file our way with any degree of frequency.
OTOH OLE DB using "Provider=Microsoft.Jet.OLEDB.4.0" is capable of reading a Schema.ini file that has been placed in the same directory as the source text and assigning column names/types/widths per the Schema.ini file.
A Schema.ini file can be created relatively quickly, easily and error-free by pasting the contents of an application's file layout documention into Excel; doing a little beautification there; and then writing some VBA code to read it and create Schema.ini.
Problem is that I'm totally green with SSIS and am tripping over that "ConnectionString property has not been initialized" error.
- Bearbeitet PeteCress Freitag, 31. Juli 2009 16:49
Freitag, 31. Juli 2009 16:46
-
Anmelden
try
http://www.connectionstrings.com/textfileThat's what I've been working out of all along: almost verbatim.
I'm even starting to think my connection file might be correct.... -)
But there's that pesky error message....
I think I'm getting a little further though. Seems like if I hop back and forth between "Connection" and "All" in Connection Manager, it comes to it's senses and starts telling me "Invalid connection String".
When I bring up the .UDL file in "Data Link Properties" and click "Test Connection" it tells me "...failed bc.... not a valid path."
But it *is* a valid path - since I loaded it into Data Link Properties by navigating/clicking on it....
Viz:
http://tinyurl.com/n344wj
- Bearbeitet PeteCress Freitag, 31. Juli 2009 17:22
Freitag, 31. Juli 2009 16:47
- 1
Anmelden
OK , yes you are right now i understand
i am just making a wild guess try changing the Connection property to DELAYVALIDATION = TRUE
please tell me if it workedSincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 16:52
- 1
Anmelden
i saw your link, i am working on it
please waitSincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 17:29
- 1
Anmelden
I am still working on it but can you send me the package and files, that is if you like
youcan remove all object and file info thatare confidential
SNikkhah@Live.caSincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 17:41
-
Anmelden
OK , yes you are right now i understand
i am just making a wild guess try changing the Connection property to DELAYVALIDATION = TRUE
please tell me if it workedIt's getting better and better...
I now have it to where the "Data Link Properties" tool (when one clicks on a UDL file) opens my connection string file and gets a successful "Test Connection".
viz: http://tinyurl.com/mdrgx7 That successful connection was using this:
[oledb]
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\SFIM_SSIS\MS Tutorial\;Extended Properties="text;HDR=No;FMT=Fixed";Persist Security Info=FalseBut when I point SSIS to that same file, it's not buying the path to the text file.
viz:
http://tinyurl.com/lv2h68 I'm starting to wonder whether SSIS goes to that Connect.UDL file and actually uses what is there... or does it go the the file, extract what's there, and load it into it's own connection object.#2 seems like it might promise an explaination for the "not a valid path" error. Otherwise, how could it throw an error if "Data Link Properties" did not throw an error AND.... the path was populated by navigating to it instead of typing it (i.e. no possibility of a user typo).
That might also explain the "connection string property not initialized" messages - bc I haven't been doing the right things to make it to to the UDL file and extract what it needs.
- Bearbeitet PeteCress Freitag, 31. Juli 2009 18:29
Freitag, 31. Juli 2009 17:51
-
Anmelden
i am just making a wild guess try changing the Connection property to DELAYVALIDATION = TRUE
please tell me if it workedI tried it, but could not make it work.
- Bearbeitet PeteCress Freitag, 31. Juli 2009 17:59
Freitag, 31. Juli 2009 17:58
- 1
Anmelden
quick suggestion, move the file to a local foder , remove it from H drive and copy it into where the pacakge is
Sincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Freitag, 31. Juli 2009 18:01
-
Anmelden
quick suggestion, move the file to a local foder , remove it from H drive and copy it into where the pacakge is
Done. No improvement.
I was suspicious of the LAN thing too....
You should have the whole package as a .ZIP file in your inbox by now. If not let me know ASAP and I will re-send it.
Have a good weekend.
I'm going to flee this place pretty soon.... so I'll tune back in on Monday.
Freitag, 31. Juli 2009 18:26
- 1
Anmelden
i can see the tables but the message that i get is "could not find installable isam"
IN the Connection Manager set
Database File Name: C:\MS_Tuturial\
Extended Pro.: text;HDR=No;FMT=FixedSave OK
ADD a data Flow
in the DFT add a OLE DB SOURCE
in the OLE DB SOURCE Set ...
OLE DB connection manager: TAXEXT
Data Access Mode: SQL Command
SQL Command Text: SELECT * FROM TaxExt.txt
Click on Query builder and Run the Query
you will see your records but i dont know how to set the field to the Schema.ini file and how to set the fields in OLE DB source object
when i want to save the OLE SOurce object i get an error "could not find installable isam"still working on it
Sincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Dienstag, 4. August 2009 16:34
- 1
Anmelden
sorry i cant find anything
i am still working on itSincerely SH -- Please kindly don’t forget to mark the post(s) that answered your question and/or vote for the post
Dienstag, 4. August 2009 20:06