Re: INSERT INTO another access table from ADP based on field

Tech-Archive recommends: Fix windows errors by optimizing your registry



Yes, you can simply use ADO to update data in an external database from
inside ADP app, whether it is MDB file or another SQL Server DB. Here is the
psudo code:

Dim cn As ADODB.Connection
Set cn=New ADODB.Connection
cn.Open connectionString_To_TheDB

Dim strSQL As String
strSQL="INSERT INTO theTable (....) VALUES (...)"
cn.Execute strSQL
cn.Close

When the connection is to a MDB file, the ConnectionString looks like:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\myPath\myDb.mdb"


"AMH" <ahelle@xxxxxxxxxxxxxxx> wrote in message
news:1147844374.871489.319720@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I was hoping someone could help me with inserting a record from an ADP
to a MDB, based on the current record displaying on a form.

eg. I add a new record in an access form, when I click Save, copies
that record to another database.

Previously, both databases were MDB, and this is the SQL I used:

INSERT INTO [MS Access;DATABASE=T:\Databases\Training
Database\training.mdb].training ( [number], type, name, [Yes-No_Fld] )
SELECT documents.number_rev, "Internal" AS Expr2, documents.title, "No"
AS Expr1
FROM documents
WHERE (((documents.number_rev)=Forms!documents_form!number_box));

Now, I need to do the same thing from SQL Server (ADP) to MDB.

I have heard that you can do this using an ADO command, but I have no
idea what that is...?

Any help would be appreciated.



.



Relevant Pages

  • Re: From .mdb to .adp database
    ... I decided to go on with adp project, and i have created a store ... But queries are different stories. ... In SQL Server, there are Views, Stored Procedures, UDFs. ... Also, when you decide to use MDB front-end, you can choose use MDB ...
    (microsoft.public.access.adp.sqlserver)
  • Re: From .mdb to .adp database
    ... there is no exact equivalent query object in SQL Server to MDB's query. ... Most likely, the wizard converts MDB queries to Viwes or SP, if the queries are convertiable. ... Also, when you decide to use MDB front-end, you can choose use MDB queries in the front end or use SQL Server side query objects. ... SQL Server is very powerful server software, whether you use MDB, ADP or anything else to access data from it, you MUST learn how to use it and almost for sure you need to learn another programming environment. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: From .mdb to .adp database
    ... there is no exact equivalent query object in SQL Server to MDB's query. ... Most likely, the wizard converts MDB queries to Viwes or SP, if the queries are convertiable. ... Also, when you decide to use MDB front-end, you can choose use MDB queries in the front end or use SQL Server side query objects. ... SQL Server is very powerful server software, whether you use MDB, ADP or anything else to access data from it, you MUST learn how to use it and almost for sure you need to learn another programming environment. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Upsizing design considerations
    ... reports, with a ADP, or mdb (actually, it should be mde, or a ADE when you ... you would LINK the tables to sql server, and NOT USE a adp (the reasons is ... the first two remote users ...
    (microsoft.public.access.gettingstarted)
  • RE: database options with SBS 2003 R2
    ... It was doable for the customer to design their own access database in a peer ... If you don't want to deal with a version of SQL Server for the data, ... end MDB files. ...
    (microsoft.public.windows.server.sbs)