Re: Connection between MDB and SQL Server
From: Kate (anonymous_at_discussions.microsoft.com)
Date: 04/11/04
- Next message: Dirk Goldgar: "Re: How to dump a table into an msdos text file"
- Previous message: Dirk Goldgar: "Re: msaccess.exe remains in task manager; which vars cause?"
- In reply to: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Next in thread: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Reply: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 10 Apr 2004 20:07:59 -0700
Alex
Thank you for your post.
According to your code,table2 is on Access database but I
don't need to specify that it is Access table.
Is that accurate ? Why I don't need it ?
How can ADO judge this is not a SQL table but Access
table ?
I am a quite beginner of ADO.
I will try with your code tomorrow at my office.
Before doing it, I am curious.
Thanks,
Kate
>-----Original Message-----
>then SQL will be:
>strSql="INSERT INTO table(field1,field2) Select fileld1,
field2 from table2"
>
>--
>Alex Dybenko (MVP)
>http://Alex.Dybenko.com
>http://www.PointLtd.com
>
>
>"Kate" <anonymous@discussions.microsoft.com> wrote in
message
>news:1afe401c41ecd$a8e538a0$a101280a@phx.gbl...
>> I am trying to make a program with ADO. I want to add
>> data from Access into the table on SQL Server.
>> I wrote the code like the below.
>>
>> strCn="Provider=SQLOLEDB;Data Source=Server;Initial
>> Catalog=database;User ID=userid;Password=pwd;"
>> strSql="INSERT INTO table(field1,field2) VALUES
>> ('access','u.s.') "
>>
>> Set cn = New ADODB.Connection
>> cn.ConnectionString = strCn
>> cn.open
>> ・
>> ・
>>
>> It worked fine.
>> But what I want to do is to add part of the data in the
>> table of Access into the table of SQL Server.
>> How should I write INSERT statment ? I need to use ADO.
>>
>> Can anyone help ?
>>
>> Kate
>>
>
>
>.
>
- Next message: Dirk Goldgar: "Re: How to dump a table into an msdos text file"
- Previous message: Dirk Goldgar: "Re: msaccess.exe remains in task manager; which vars cause?"
- In reply to: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Next in thread: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Reply: Alex Dybenko: "Re: Connection between MDB and SQL Server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|