delete columns from text database
delete columns from text database
delete columns from text database
delete columns from text database
delete columns from text database
delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database
delete columns from text database delete columns from text database
delete columns from text database
Go Back  Xtreme Visual Basic Talk > > > delete columns from text database


Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2017, 11:59 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 289
Default delete columns from text database


Hi,
I have a correctly set up schema.ini file and the accompanying .txt file it relates to. Both are in the same folder as they should be. The .txt file is delimited with a "£" symbol (the .txt file data comes from a US-based scientific group so I can be fairly certain there will be no 'sterling' character anywhere in the file, as indeed there isn't!) but I need to delete several fields from this text database programmatically.

Every example I've seen on the net assumes you want to not only use your .txt database file but also a regular .mdb database - say, import the .txt data into the regular DB.

I want to do something much simpler - use only the .txt file database (i.e., delete some fields in it). The SQL isn't the problem, it's knowing how to connect to the .txt database in the first place so that one can interact with it.
Any ideas? Many thanks in advance.
Reply With Quote
  #2  
Old 07-11-2017, 08:28 PM
Kluz's Avatar
Kluzdelete columns from text database Kluz is offline
Sapience.Aquire

Super Moderator
* Expert *
 
Join Date: Oct 2003
Location: Lake Bluff, Ill., U.S.
Posts: 3,445
Default

You will need to read the text file to a recordset: here, Create a second recordset and read into it all data that you need. Then, if you want to, send it back into a text file (easy enough to find now that you know what to look for).
__________________
No the other right mouse click
Reply With Quote
  #3  
Old 07-12-2017, 06:07 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 289
Default

Cheers, I will try that (though I am using DAO rather than ADO, is that still viable?) - just a couple of ?s (oh very well, 3)...
1) The text file has column names, I just don't want to use them, so it's "hdr=no", is it?
2) I can't see anywhere that the delimiting character is defined. Should I put that somewhere?
3) Presumably I rewrite the rs back into the original .txt file, thereby overwriting it with the new desired version.
Reply With Quote
Reply

Tags
file, .txt, database, delete, fields, text, regular, data, import, assumes, .mdb, net, interact, advance, ideas, connect, i.e, simpler, sql, knowing, folder, delimited, relates, accompanying, columns


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
delete columns from text database
delete columns from text database
delete columns from text database delete columns from text database
delete columns from text database
delete columns from text database
delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database delete columns from text database
delete columns from text database
delete columns from text database
 
delete columns from text database
delete columns from text database
 
-->