hi
I have got a strange problem. May I know any solution for this.
Here is the detailed description about the problem
We have got a mainframe system and also production and developmen
server.
There was an application in the production server since 3 years and wa
working fine. Recenlty we got into stucked up with this problem. Ever
night the mainframe generates few text files and thru FTP it sent
those files to production server.
In the production server application we do have got few jobs (i.
dotnet application) that reads this text file(s) and the data fro
these text files will be stored in our sql server DB for the use of we
applications.
Now the jobs in the development server (which we are using for testing
got creating problems like "Invalid index" and stoping the proces
further. After examining the problem in respective dotnet application
got to know the problem where it is but I am surprised to see that th
same application working fine in production server since few years.
I dont have the source code of dotnet application which is running i
the production server. But I do have source code of dot net applicatio
that is in development server.
Here in the dot net application I am able to see the source code and i
is being written like this...the algorithm as follows.
1. Dynamically getting the connection string (i.e
Provider=Microsoft.jet.oledb.4.0;Data source=C:\myapp;Extende
Properties=Text;)
2. Establishing oledb connection.
3. Dynamically constructing the SELECT stmt with respective txt file e
"select * from members.txt" (here the members.txt file is from Mainfram
and stored in C:\myapp folder)
4. Using OLEDB Command object executing the about SELECT statement an
returning back to OLEDBDataReader object back to the caller.
5. In the caller function the person who written the code directl
referring values from the reader as objReader.getvalue(0)
objReader.getvalue(1)... so on.
6. Now the problem is after executing the command object in the reade
I am able to see only one column i.e objReader.getvalue(0). It
because
the entire one line of the text file is coming in one column (but i
suppose to split in to multiple columns)
7. Its generating an exception when the code refers second column o
wards.
8. Here I donno wat is the delimeter for knowing columns in the tex
file.
9. I do see few spaces between values in the text files.
10. Here my doubt is if the code is compiled like this how its runnin
fine in the production server.
11. Or if I wann change code in the development server how could I d
that. After I seached in internet in the while generating th
connection string in the extended properties I have to mention li
this..
"Extended Properties=Text;HDR=No;delimited=TabDelimited" This is i
case of the text file content was delimited by tab
Where as here I am thinking that its not delimited by TAB and als
thinking that it might be delimited by no of characters example.. firs
column is 15 characters and from 16th character on wards its secon
column until 25th character etc.... in this case how and wat valu
should I mention in the delimited property?
can any one of you enlighten me on this.
I am desperately looking for valuable suggestions.
Thanks in advance...
V
--
svija
svijay - 30 Dec 2005 20:45 GMT
Hi
I got the solution I must use schema.ini file to solve this and I nee
to define the column definitions in that file.
thx to all of
--
svija