Re: Using Excel data in a VB6 database
- From: Duane Arnold <"Do forget about it"@PleaeDo.BET>
- Date: Sun, 03 Sep 2006 13:10:56 GMT
Henk van Winkoop wrote:
...ongoing report...;-)
Also using komma-delimited files when NOT using DEV results in errors when updating records.
I am talking about a bulk insert of text comma delimited records into a table. Bulk insert of records into a SQL Server Table using BULK command.
I don't have Access on my laptop only SQL Server. But as I recall, in the Access IDE most likely under the File Menu option there is a Import command that will allow import a text comma-delimited file into an Access database's table.
Microsoft support says:
"The ODBC textfile driver does not support DELETE and UPDATE statements."
and advices to use Access .mdb files.
You can use many types of databases like SQL Server, Oracle. Access, MySQL, Betrieve etc, etc as vendors provide the drivers. And no you're not going to be able to use ODBC and a text file driver in the manner in which you talk about.
So I think I will resign from using comma-delimited files itself as a database for my VB6 application.
No, you cannot use a comma-delimited file as some database. You can load the comma-delimited data into a database table that has the fields already set-up in the table. You load the table with the database utility to load text comma-delimited data into the table. Or you write a VB 6 program using a text reader, read the text file and use ADO to insert the records into the table, after you have populated each field in the table from the comma-delimited record you just read. And then you read the next text record.
If records are already there because you previously inserted them, then you would have used ADO in VB 6 to determine if the record already exist and updated the existing record from data in your comma-delimited text file. Or with VB 6 using ADO, you would delete a record based on some criteria.
You can even use ADO to access the existing text data in the Excel Spread *** cell by cell if you wanted to do that. You can instantiate an Excel object that gives you all the means to manipulate the Excel Spread *** within VB 6 code.
Duane :)
.
- Follow-Ups:
- Re: Using Excel data in a VB6 database
- From: Henk van Winkoop
- Re: Using Excel data in a VB6 database
- References:
- Using Excel data in a VB6 database
- From: Henk van Winkoop
- Re: Using Excel data in a VB6 database
- From: Duane Arnold
- Re: Using Excel data in a VB6 database
- From: Henk van Winkoop
- Re: Using Excel data in a VB6 database
- From: Henk van Winkoop
- Using Excel data in a VB6 database
- Prev by Date: Re: break/continue in loops
- Next by Date: Re: Using Excel data in a VB6 database
- Previous by thread: Re: Using Excel data in a VB6 database
- Next by thread: Re: Using Excel data in a VB6 database
- Index(es):