-
Working with a text file for my DB...
Hi,
I'm trying to connect to a txt file, with an ODBC connection. I used the
Microsoft text driver. When I open my recordset with the DSN... I get this
error:
Execution error '-2147467259 (80004005)' [Microsoft][ODBC text driver] The
jet database engine can't open the file '(unknown)'. It can be already open
in exclusive mode or you don't have the rights access to see this data.
My text file is not open when I open the recordset.
Here is my query :
rsDnamae.Open "select * from Dnamae", "DSN=Dnamae"
I hope I will receive answer soon!
Tanx in advance!
Pascal;
-
Re: Working with a text file for my DB...
You can access a text file using the Jet OLEDB provider. Just add "Extended
properties=text" to your connection string. As for dBase, the folder which
contains the file will be treated as the database and every text file on it
as a table.
Pascal escribió en mensaje <39e0d4a8$1@news.devx.com>...
>
>Hi,
>
> I'm trying to connect to a txt file, with an ODBC connection. I used the
>Microsoft text driver. When I open my recordset with the DSN... I get this
>error:
>
>
>Execution error '-2147467259 (80004005)' [Microsoft][ODBC text driver] The
>jet database engine can't open the file '(unknown)'. It can be already open
>in exclusive mode or you don't have the rights access to see this data.
>
> My text file is not open when I open the recordset.
>
> Here is my query :
>
> rsDnamae.Open "select * from Dnamae", "DSN=Dnamae"
>
> I hope I will receive answer soon!
>
> Tanx in advance!
>
> Pascal;
-
Re: Working with a text file for my DB...
"Jman" <jman0@mailandnews.com> wrote:
>You can access a text file using the Jet OLEDB provider. Just add "Extended
>properties=text" to your connection string. As for dBase, the folder which
>contains the file will be treated as the database and every text file on
it
>as a table.
>
>Pascal escribió en mensaje <39e0d4a8$1@news.devx.com>...
>>
>>Hi,
>>
>> I'm trying to connect to a txt file, with an ODBC connection. I used
the
>>Microsoft text driver. When I open my recordset with the DSN... I get this
>>error:
>>
>>
>>Execution error '-2147467259 (80004005)' [Microsoft][ODBC text driver]
The
>>jet database engine can't open the file '(unknown)'. It can be already
open
>>in exclusive mode or you don't have the rights access to see this data.
>>
>> My text file is not open when I open the recordset.
>>
>> Here is my query :
>>
>> rsDnamae.Open "select * from Dnamae", "DSN=Dnamae"
>>
>> I hope I will receive answer soon!
>>
>> Tanx in advance!
>>
>> Pascal;
>
>
Pascal,
I asked a question last week about using the OLEDB text provider. Paul Clement
posted a link to this article on using a schema.ini file. Using a schema.ini,
you can define column names and types, specify what type of delimiter is
used in the text file, etc. You may find it to be of interest.
http://msdn.microsoft.com/library/ps...k/odbc8t45.htm
Andrew.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|