Re: How to select rows from a mapped protected .MDB and insert into local table
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Thu, 10 Aug 2006 10:49:44 -0400
mikepallorad@xxxxxxxx wrote:
its
insert into MainOrderTable field1,field2,field3,field4
select field1,field2,field3,field4 from RemoteOrderTable
No, that's not the actual statement: that's what you think the result of
your concatenation will look like (your tables don't have fields called
field1,field2, etc.).
Debug your application (it IS VB, right?) and debug.write the contents
of strSQL to the Immediate window, or put a label control or textbox on
your form and set its Text property to the value of the variable. Show
us the actual sql statement. You need to see it as well so you can
copy/paste it into the sql view of an Access Query Builder to test it.
<snip>
STRSQL = ""
STRSQL = "insert into [MainOrderTable] [TType],[BDate],[BNo],[Ordno]
SELECT [TType],[BDate]"
STRSQL = STRSQL & ",[BNo],[Ordno] FROM "
STRSQL = STRSQL & "[Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=Z:\RemoteSales.mdb;Jet OLEDB:Database "
STRSQL = STRSQL & "Password=remotepwd].[RemoteOrderTable]"
I don't believe using the OLEDB connection string is legal in the FROM
clause of a sql statement. I believe you have to use your original
syntax:
[MS Access;DATABASE=" & Left(Drive1.Drive, 2) & _
"\MappedDB.mdb;Pwd='" & text1.text & "'].[RemoteOrderTable]"
Again, you would have to try it in the Access Query Builder to be sure.
You may need to take this to an Access newsgroup to get Jet-specific
help.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- References:
- [ADO] How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- Re: [ADO] How to select rows from a mapped protected .MDB and insert into local table
- From: Bob Barrows [MVP]
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: Bob Barrows [MVP]
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: Bob Barrows [MVP]
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: Bob Barrows [MVP]
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: Bob Barrows [MVP]
- Re: How to select rows from a mapped protected .MDB and insert into local table
- From: mikepallorad
- [ADO] How to select rows from a mapped protected .MDB and insert into local table
- Prev by Date: Re: How to select rows from a mapped protected .MDB and insert into local table
- Next by Date: Re: Problem accessing SQL Express Server with ADO-Lib
- Previous by thread: Re: How to select rows from a mapped protected .MDB and insert into local table
- Next by thread: Re: Transform DataTables
- Index(es):
Relevant Pages
|
|