Can I avoid schema.ini in VB5? 
Author Message
 Can I avoid schema.ini in VB5?

Problem : Dealing with text file based data in VB5.

I have users creating many different text files (from the Unix box) with
similar but unpredictable names all with exactly the same data layout.
I would like to be able to declare one global file layout within the
schema.ini so that I can read it in with a standard data control and
have a user input to decide which of the files is read - but this
doesn't appear possible.

I don't want to create a massive schema.ini with every possible text
file name in it (dull + ugly).

I don't want to keep building schema.ini's at run-time because I will
have multiple users in the same directory creating these text files and
then wanting to manipulate them and I don't have the privs on NT to
create temp user directories.

Not enough data on SQL server just yet either.

Does anyone have any neat ideas that will help in this corner of VB that
MS appear to have thrown together (I think more thought went into the
Excel flight sim!)
--
Antony Melvin



Fri, 17 Nov 2000 03:00:00 GMT
 Can I avoid schema.ini in VB5?

Antony,
Sorry, I cannot be of help to you, but I was hoping I could ask you
a question (as you appear to be one step ahead of me).  I am trying to
discover a way to migrate 20 year-old ISAM files to Access or SQL
Server by writing them out as flat text files and then importing the data
fields into predefined tables in Access DB thru VB5.0.  My problem
is that I don't understand the concept behind schema.ini.  Do you have
an example of a real life schema.ini?  And what directory is schema.ini
to reside within?  Again, this is a data migration question, how to set up
the mechanism to move the data into a relational data base.  If there is
a better way that you know of, I would like to hear it.  I must start by
writing a COBOL program to read the ISAM files (20 year-old Data
General file access software), which is no problem, but then what?
Thanks for any words of wisdom or experience....
Dean Slindee

Quote:

> Problem : Dealing with text file based data in VB5.

> I have users creating many different text files (from the Unix box) with
> similar but unpredictable names all with exactly the same data layout.
> I would like to be able to declare one global file layout within the
> schema.ini so that I can read it in with a standard data control and
> have a user input to decide which of the files is read - but this
> doesn't appear possible.

> I don't want to create a massive schema.ini with every possible text
> file name in it (dull + ugly).

> I don't want to keep building schema.ini's at run-time because I will
> have multiple users in the same directory creating these text files and
> then wanting to manipulate them and I don't have the privs on NT to
> create temp user directories.

> Not enough data on SQL server just yet either.

> Does anyone have any neat ideas that will help in this corner of VB that
> MS appear to have thrown together (I think more thought went into the
> Excel flight sim!)
> --
> Antony Melvin



Mon, 20 Nov 2000 03:00:00 GMT
 Can I avoid schema.ini in VB5?

Coincidentally we're porting cobol/powerhouse {*filter*}on c-isam from DG
Aviion to SQL Server - small world.

This is how a working schema.ini looks (obviously fill in the etc).
Create a text file called schema.ini, and within it you put your file
layouts, it goes like this...

[Product]
ColNameHeader=False
Format=FixedLength
MaxScanRows=25
CharacterSet=OEM
Col1=ProductCode char width 10
Col2=filler1 char width 1
Col3=Description char width 30
Col4=filler2 char width 1
Col5=OrderDate date width 9
etc
[Customer]
ColNameHeader=False
Format=FixedLength
MaxScanRows=25
CharacterSet=OEM
Col1=CustomerCode char width 10
Col2=filler1 char width 1
etc

Look at 'Initializing the text data source driver' using on-line help
for more help.

Then in VB set up a standard data control.
Set the databasename property to (full path)/schema.ini and the
recordsource property will have a dropdown option of Product, Customer
etc.

An alternative is the visual data manager.

Hope this helps.


writes

Quote:
>Antony,
>Sorry, I cannot be of help to you, but I was hoping I could ask you
>a question (as you appear to be one step ahead of me).  I am trying to
>discover a way to migrate 20 year-old ISAM files to Access or SQL
>Server by writing them out as flat text files and then importing the data
>fields into predefined tables in Access DB thru VB5.0.  My problem
>is that I don't understand the concept behind schema.ini.  Do you have
>an example of a real life schema.ini?  And what directory is schema.ini
>to reside within?  Again, this is a data migration question, how to set up
>the mechanism to move the data into a relational data base.  If there is
>a better way that you know of, I would like to hear it.  I must start by
>writing a COBOL program to read the ISAM files (20 year-old Data
>General file access software), which is no problem, but then what?
>Thanks for any words of wisdom or experience....
>Dean Slindee


>> Problem : Dealing with text file based data in VB5.

>> I have users creating many different text files (from the Unix box) with
>> similar but unpredictable names all with exactly the same data layout.
>> I would like to be able to declare one global file layout within the
>> schema.ini so that I can read it in with a standard data control and
>> have a user input to decide which of the files is read - but this
>> doesn't appear possible.

>> I don't want to create a massive schema.ini with every possible text
>> file name in it (dull + ugly).

>> I don't want to keep building schema.ini's at run-time because I will
>> have multiple users in the same directory creating these text files and
>> then wanting to manipulate them and I don't have the privs on NT to
>> create temp user directories.

>> Not enough data on SQL server just yet either.

>> Does anyone have any neat ideas that will help in this corner of VB that
>> MS appear to have thrown together (I think more thought went into the
>> Excel flight sim!)
>> --
>> Antony Melvin

--
Antony Melvin


Fri, 24 Nov 2000 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. ODBC /w Schema.ini and Delimited Records(:)...Problem With Double Quote

2. schema.ini

3. Format definition in schema.ini

4. Exporting to ASCII File with SCHEMA.INI?

5. Schema.ini File

6. How to ignore a column in Schema.ini file

7. Where to put the Schema.ini File

8. Text File Databases/Schema.ini Limitation

9. SCHEMA.INI Not Flushing

10. Schema.ini and fixed length records - not delimited

11. ODBC Text Driver -- Schema.INI Problem !

12. schema.ini file location


 
Powered by phpBB® Forum Software