Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to find out how to make "schema.ini". 2

Status
Not open for further replies.

THOMASNG

Technical User
May 3, 2002
254
US
I already have a database, "CCRTable1" in ACCESS 2000. I can manipulate it directly via ADODC and a .vbp on a second computer.
I would now like to fully automate the creation of two
ASCII (plain text files), "OWNER.TXT" and "CONTAINER.TXT", using the volume of data stored in CCRTable1.
I already have created two queries, "OwnerTxtCCRTable1" and "ContainerTxtCCRTable1". I've used these two queries to partially ease the tasks, but it's still a quite a bear!
I think I could finish this if I got clear instructions
on how to create "schema.ini" for each of these files.
 

So what you are saying is you want to take the data in the database and create text files with that data.

1. Open Datebase, Recordset, and Output Text File.
2. Loop through recordset until EOF Writting to text file
3. Close Text File, Recordset, and Database.

Good Luck

 
There is some notes on schema.ini here:

There was some stuff on MSDN, but it seems to be down at present:
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 

The JET provider works also well for this.
You would need to supply an Schema.Ini in the output folder in order to override the default registry settings (delimiter, etc.)

Use a SELECT INTO action query for this.

See thread709-334828 for the Schema.Ini [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 


Dim conn As ADODB.Connection
set conn=Adodc1.Recordset.ActiveConnection

conn.Execute "SELECT dbField1 AS txtField1,dbField2 AS txtField2 " _
& "INTO [OWNER.TXT] " _
& "IN '' [TEXT;DATABASE=C:\Temp\;] " _
& "FROM CCRTable1 " _
& "WHERE dbField1 = 'ABC'"
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
To clarify:

OWNER.TXT and CONTAINER.TXT will contain only a portion
of the information stored in CCRTable1. I know how to transfer the entire table.
 
Johnwm's answer works. MICROSOFT has a separate link -
one that allows you to search. The clearest article I found was "Working with Text Files".
Thanks again, Johnwm!
 

> OWNER.TXT and CONTAINER.TXT will contain only a portion
of the information stored in CCRTable1. I know how to transfer the entire table.

Therefore the WHERE clause.


>The clearest article I found was "Working with Text Files".

And that is the link that I directed you to via a link in the next thread.

johnwm: the second link you gave comes up with a page not found.

[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Sorry CCLINT, but as I said in my post There was some stuff on MSDN, but it seems to be down at present:

It used to work, but knowing MS it may now be gone forever!
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Yes, the page is still inoperable today, but you can still search for articles on "schema.ini". "Working with Text Files" is near the top of the articles summarized.
CClint deserves another star for keeping us all on our toes.

 
Sorry johnwm, I overlooked your mention of the link being down (this time I read too fast [wink]) [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 


Thanks THOMASNG. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top