Re: Connection between MDB and SQL Server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kate (anonymous_at_discussions.microsoft.com)
Date: 04/11/04


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
>> &#12539;
>> &#12539;
>>
>> 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
>>
>
>
>.
>



Relevant Pages

  • Re: How to Mimic Access Externally Linked Tables using ADO?
    ... > using SQL Server for efficiency reasons. ... > connection up programmatically using ADO or ADOX or some SQL Server API? ... >> newsgroup, but if you have a good reason to send me e-mail, you'll find ... ADO does not have a query engine. ...
    (microsoft.public.data.ado)
  • Re: How to access the SQL server express from mfc application?
    ... There are different ways to do this via MFC. ... You could certainly try ADO, ... the entire contents of the database to a SQL Server Standard Server. ...
    (microsoft.public.vc.mfc)
  • Transmitting/Receiving Data via MS Access/ADO
    ... Can someone give me a brief primer on data encrytion/security when ... transmitting data between SQL Server and an MS Access database via ADO. ...
    (microsoft.public.sqlserver.security)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.conversion)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.adp.sqlserver)