473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Action pass-through with a form variable Access 2003

Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]

Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.

I'm a bit new to create queries and macros but I learn fast loll.
Thank you.
Jul 16 '08 #1
13 3692
You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. What you can
do, however, is to use the values of those variables (Controls on a Form,
just By The Way, are not "variables" in Access terms) and construct the SQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. By using a Pass-Through Query are telling Jet and ODBC to leave it
completely alone... to "pass it through" exactly as you have written it.

You can use variables in a regular query that will first be processed by the
Jet or ACCDB database engine before being handed over to the ODBC driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.

Another note: in some servers, e.g., MS SQL Server, "timestamp" is a special
type of field, not a "date and time" as you know them in Access.

Larry Linson
Microsoft Office Access MVP
"magickarle" <ma********@hotmail.comwrote in message
news:9b**********************************@k13g2000 hse.googlegroups.com...
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]

Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.

I'm a bit new to create queries and macros but I learn fast loll.
Thank you.

Jul 16 '08 #2
Larry Linson wrote:
>[...]
where empl_lst.timestamp between ...
[...]
Another note: in some servers, e.g., MS SQL Server, "timestamp" is a special
type of field, not a "date and time" as you know them in Access.
.... and is therefore a keyword that should not be used as field name.

--
Peter Doering [MVP Access]
Jul 16 '08 #3
magickarle <ma********@hotmail.comwrote in news:9bdf57af-8cd2-4dff-9861-
3a**********@k13g2000hse.googlegroups.com:
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
Cheer up. All is not lost. If you say 200 Hail Marys and beat yourself
nightly with a horse hair whip for a month you may be forgiven.
Jul 16 '08 #4
On Jul 16, 2:53*pm, "Larry Linson" <boun...@localhost.notwrote:
You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. * What you can
do, however, is to use the values of those variables (Controls on a Form,
just By The Way, are not "variables" in Access terms) and construct the SQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. *By using a Pass-Through Query are telling Jet and ODBC to leave it
completely alone... to "pass it through" exactly as you have written it.

You can use variables in a regular query that will first be processed by the
Jet or ACCDB database engine before being handed over to the ODBC driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.

Another note: in some servers, e.g., MS SQL Server, "timestamp" is a special
type of field, not a "date and time" as you know them in Access.

*Larry Linson
*Microsoft Office Access MVP

"magickarle" <magicka...@hotmail.comwrote in message

news:9b**********************************@k13g2000 hse.googlegroups.com...
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]
Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.
I'm a bit new to create queries and macros but I learn fast loll.
Thank you.- Hide quoted text -

- Show quoted text -
ok. let say I got a button CmdExtract on the mainform:

Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String

Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")

strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"

With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub

I'm getting Run time error 3146
ODBC call failed.

Is there a way to have more info than that?! That sounds line a
general error message.

What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.
After this, I would append instead of creating a table.

Thank you
Jul 17 '08 #5
On Jul 16, 5:28*pm, lyle fairfield <lylef...@yah00.cawrote:
magickarle<magicka...@hotmail.comwrote in news:9bdf57af-8cd2-4dff-9861-
3a0125e9a...@k13g2000hse.googlegroups.com:
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.

Cheer up. All is not lost. If you say 200 Hail Marys and beat yourself
nightly with a horse hair whip for a month you may be forgiven.
I'm fine with 200 Hail Marys, but I'll leave the wip to my girlfriend
loll!
Jul 17 '08 #6
On Jul 17, 11:39*am, magickarle <magicka...@hotmail.comwrote:
On Jul 16, 2:53*pm, "Larry Linson" <boun...@localhost.notwrote:


You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. * What youcan
do, however, is to use the values of those variables (Controls on a Form,
just By The Way, are not "variables" in Access terms) and construct theSQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. *By using a Pass-Through Query are telling Jet and ODBC to leave it
completely alone... to "pass it through" exactly as you have written it..
You can use variables in a regular query that will first be processed by the
Jet or ACCDB database engine before being handed over to the ODBC driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.
Another note: in some servers, e.g., MS SQL Server, "timestamp" is a special
type of field, not a "date and time" as you know them in Access.
*Larry Linson
*Microsoft Office Access MVP
"magickarle" <magicka...@hotmail.comwrote in message
news:9b**********************************@k13g2000 hse.googlegroups.com....
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]
Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.
I'm a bit new to create queries and macros but I learn fast loll.
Thank you.- Hide quoted text -
- Show quoted text -

ok. let say I got a button CmdExtract on the mainform:

Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String

Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")

strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"

With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub

I'm getting Run time error 3146
ODBC call failed.

Is there a way to have more info than that?! That sounds line a
general error message.

What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.
After this, I would append instead of creating a table.

Thank you- Hide quoted text -

- Show quoted text -
Ahh, the problem is in my original pass-through query, I got Into
TblTemp but since it's a pass-through, it doesn't know what to do with
the into.
Is there a way to dump the resulting recordsets to a new Table?
Thanks a lot people!
Jul 17 '08 #7
I've never used Connect as a property of a database, only a table. But, to
set the connect property of your CurrentDB (which clearly is not a connected
database, but a local Access database) or a database object (LoDB) derived
from it, just doesn't make any sense to me. Also, in Access, you can reset
the .Connect property of a table, then execute a .RefreshLink, but, when I
used this with servers, it didn't work and the TableDef had to be
re-created.

And, as Peter pointed out, .timestamp is a MS SQL Server reserved word, so
shouldn't be used as a Field Name.

Oh, I'm not sure that you said you were using MS SQL Server. Whatever
server DB you are using, the SQL string you construct must be in that server
DB's dialect of SQL. I'm not the one to "vet" the SQL for any server DB...
when need be for me, I carefully check it out in that server DB's
documentation. And, I'm definitely not the one to "vet" a Connection string.

Lazy as I am, my recollection is that I set up the passthrough query as a
Query object, and simply replace the SQL string with the modified one. And,
that is where you'd set the Connection (but it's been long enough that I am
not sure of the details, anymore).

And, the last time I fiddled around with passthrough Queries was "'way back
when", using an Informix server DB, and I don't have a copy of the database
to refresh my memory.

I'm afraid I've about exhausted my store of hints and tips on the subject,
so I'm hoping, if you don't get it working and need more, that someone else,
with more recent experience will jump in.

Larry Linson
Microsoft Office Access MVP

"magickarle" <ma********@hotmail.comwrote in message
news:5d**********************************@z72g2000 hsb.googlegroups.com...
On Jul 17, 11:39 am, magickarle <magicka...@hotmail.comwrote:
On Jul 16, 2:53 pm, "Larry Linson" <boun...@localhost.notwrote:


You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. What you can
do, however, is to use the values of those variables (Controls on a
Form,
just By The Way, are not "variables" in Access terms) and construct the
SQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. By using a Pass-Through Query are telling Jet and ODBC to leave
it
completely alone... to "pass it through" exactly as you have written it.
You can use variables in a regular query that will first be processed by
the
Jet or ACCDB database engine before being handed over to the ODBC
driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.
Another note: in some servers, e.g., MS SQL Server, "timestamp" is a
special
type of field, not a "date and time" as you know them in Access.
Larry Linson
Microsoft Office Access MVP
"magickarle" <magicka...@hotmail.comwrote in message
news:9b**********************************@k13g2000 hse.googlegroups.com...
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]
Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.
I'm a bit new to create queries and macros but I learn fast loll.
Thank you.- Hide quoted text -
- Show quoted text -

ok. let say I got a button CmdExtract on the mainform:

Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String

Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")

strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"

With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub

I'm getting Run time error 3146
ODBC call failed.

Is there a way to have more info than that?! That sounds line a
general error message.

What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.
After this, I would append instead of creating a table.

Thank you- Hide quoted text -

- Show quoted text -
Ahh, the problem is in my original pass-through query, I got Into
TblTemp but since it's a pass-through, it doesn't know what to do with
the into.
Is there a way to dump the resulting recordsets to a new Table?
Thanks a lot people!
Jul 17 '08 #8
On Jul 17, 2:54*pm, "Larry Linson" <boun...@localhost.notwrote:
I've never used Connect as a property of a database, only a table. *But, to
set the connect property of your CurrentDB (which clearly is not a connected
database, but a local Access database) or a database object (LoDB) derived
from it, just doesn't make any sense to me. *Also, in Access, you can reset
the .Connect property of a table, then execute a .RefreshLink, but, when I
used this with servers, it didn't work and the TableDef had to be
re-created.

And, as Peter pointed out, .timestamp is a MS SQL Server reserved word, so
shouldn't be used as a Field Name.

Oh, I'm not sure that you said you were using MS SQL Server. *Whatever
server DB you are using, the SQL string you construct must be in that server
DB's dialect of SQL. *I'm not the one to "vet" the SQL for any server DB...
when need be for me, I carefully check it out in that server DB's
documentation. And, I'm definitely not the one to "vet" a Connection string.

Lazy as I am, my recollection is that I set up the passthrough query as a
Query object, and simply replace the SQL string with the modified one. *And,
that is where you'd set the Connection (but it's been long enough that I am
not sure of the details, anymore).

And, the last time I fiddled around with passthrough Queries was "'way back
when", using an Informix server DB, and I don't have a copy of the database
to refresh my memory.

I'm afraid I've about exhausted my store of hints and tips on the subject,
so I'm hoping, if you don't get it working and need more, that someone else,
with more recent experience will jump in.

*Larry Linson
*Microsoft Office Access MVP

"magickarle" <magicka...@hotmail.comwrote in message

news:5d**********************************@z72g2000 hsb.googlegroups.com...
On Jul 17, 11:39 am,magickarle<magicka...@hotmail.comwrote:


On Jul 16, 2:53 pm, "Larry Linson" <boun...@localhost.notwrote:
You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. What you can
do, however, is to use the values of those variables (Controls on a
Form,
just By The Way, are not "variables" in Access terms) and construct the
SQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. By using a Pass-Through Query are telling Jet and ODBC to leave
it
completely alone... to "pass it through" exactly as you have written it.
You can use variables in a regular query that will first be processedby
the
Jet or ACCDB database engine before being handed over to the ODBC
driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.
Another note: in some servers, e.g., MS SQL Server, "timestamp" is a
special
type of field, not a "date and time" as you know them in Access.
Larry Linson
Microsoft Office Access MVP
"magickarle" <magicka...@hotmail.comwrote in message
>news:9b**********************************@k13g200 0hse.googlegroups.com....
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]
Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.
I'm a bit new to create queries and macros but I learn fast loll.
Thank you.- Hide quoted text -
- Show quoted text -
ok. let say I got a button CmdExtract on the mainform:
Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String
Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")
strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"
With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub
I'm getting Run time error 3146
ODBC call failed.
Is there a way to have more info than that?! That sounds line a
general error message.
What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.
After this, I would append instead of creating a table.
Thank you- Hide quoted text -
- Show quoted text -

Ahh, the problem is in my original pass-through query, I got Into
TblTemp but since it's a pass-through, it doesn't know what to do with
the into.
Is there a way to dump the resulting recordsets to a new Table?
Thanks a lot people!- Hide quoted text -

- Show quoted text -
As the help manual of access:
expression.Connect
expression A variable that represents a Database object.
So the problem is the not connect string.

My problem is I don't know how to:
In a sub-routine in access:
Run a pass-through query that would create a "local access table" with
the result of the query
Jul 17 '08 #9
magickarle wrote:
"Larry Linson" wrote:
>magickarle wrote:
>>Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String
>>Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")
>>strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"
>>With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub
>>I'm getting Run time error 3146
ODBC call failed.
>>Is there a way to have more info than that?! That sounds line a
general error message.
The details are returned by the Errors collection:

For I = 0 To Errors.Count -1
Debug.Print Errors(I)
Next I
>>What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.

Ahh, the problem is in my original pass-through query, I got Into
TblTemp but since it's a pass-through, it doesn't know what to do with
the into.
Is there a way to dump the resulting recordsets to a new Table?
Thanks a lot people!- Hide quoted text -

My problem is I don't know how to:
In a sub-routine in access:
Run a pass-through query that would create a "local access table" with
the result of the query
You cannot create a *local* table using pass-through (PT). If you need
TblTemp in your local mdb the easiest would be a standard query on the
linked table empl_Lst.

If you don't have a link on this table you can create one using:

DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;Driver={SQL Server};Server=Instance\YourServer;" & _
"Database=YourDB;UID=USERID;PWD=PWD;", _
acTable, "empl_Lst", "empl_Lst", , True

'Then

strSQL = "Select EmplID from empl_Lst into TblTemp ..."
loDB.Execute strSQL, dbFailOnError

--
Peter Doering [MVP Access]
Jul 18 '08 #10
On Jul 18, 8:24*am, Peter Doering <nos...@doering.orgwrote:
magickarlewrote:
"Larry Linson" wrote:
>magickarlewrote:
Private Sub CmdExtract_Click()
Dim loDB As DAO.Database
Dim loQdf As DAO.QueryDef
Dim strSql As String
>Set loDB = CurrentDb
StrDate_ = Format(Me!TxtStrDate, "yyyy-mm-dd")
EndDate_ = Format(Me!TxtEndDate, "yyyy-mm-dd")
>strSql = "Select EmplID from empl_Lst into TblTemp" & _
"where empl_lst.timestamp between '" + StrDate_ + "' and '" + EndDate_
+ "'"
>With loDB
.Connect = "ODBC;DSN=DNS_NAME;UID=USERID;PWD=PWD;QueryTimeout =0"
.Execute strSql, dbSQLPassThrough
End With
End Sub
>I'm getting Run time error 3146
ODBC call failed.
>Is there a way to have more info than that?! That sounds line a
general error message.

The details are returned by the Errors collection:

*For I = 0 To Errors.Count -1
* Debug.Print Errors(I)
*Next I
>What I'm trying to do is to execute an action query pass-through that
would dump the records in a newly created TblTemp.
Ahh, the problem is in my original pass-through query, I got Into
TblTemp but since it's a pass-through, it doesn't know what to do with
the into.
Is there a way to dump the resulting recordsets to a new Table?
Thanks a lot people!- Hide quoted text -
My problem is I don't know how to:
In a sub-routine in access:
Run a pass-through query that would create a "local access table" with
the result of the query

You cannot create a *local* table using pass-through (PT). If you need
TblTemp in your local mdb the easiest would be a standard query on the
linked table empl_Lst.
If it's not possible to create a local table, then would it be
possible to append to an access table the output of a pass-through
query?
>
If you don't have a link on this table you can create one using:

* DoCmd.TransferDatabase acLink, "ODBC Database", _
* *"ODBC;Driver={SQL Server};Server=Instance\YourServer;" & _
* *"Database=YourDB;UID=USERID;PWD=PWD;", _
* *acTable, "empl_Lst", "empl_Lst", , True

'Then

*strSQL = "Select EmplID from empl_Lst into TblTemp ..."
*loDB.Execute strSQL, dbFailOnError

--
Peter Doering [MVP Access]- Hide quoted text -

- Show quoted text -
Jul 24 '08 #11
magickarle wrote:
Peter Doering wrote:
>>
You cannot create a *local* table using pass-through (PT). If you need
TblTemp in your local mdb the easiest would be a standard query on the
linked table empl_Lst.

If it's not possible to create a local table, then would it be
possible to append to an access table the output of a pass-through
query?
PT means that all control is handed over to the target Server and it
doesn't know about your local tables, so no, you cannot append either.

As mentioned, the easiest way would be to establish a link to the server
table and perform a local query.

You can use the sample to create the link:

|* DoCmd.TransferDatabase acLink, "ODBC Database", _
|* *"ODBC;Driver={SQL Server};Server=Instance\YourServer;" & _
|* *"Database=YourDB;UID=USERID;PWD=PWD;", _
|* *acTable, "empl_Lst", "empl_Lst", , True

--
Peter Doering [MVP Access]
Jul 27 '08 #12
On Jul 27, 2:35*pm, Peter Doering <nos...@doering.orgwrote:
magickarlewrote:
Peter Doering wrote:
You cannot create a *local* table using pass-through (PT). If you need
TblTemp in your local mdb the easiest would be a standard query on the
linked table empl_Lst.
If it's not possible to create a local table, then would it be
possible to append to an access table the output of a pass-through
query?

PT means that all control is handed over to the target Server and it
doesn't know about your local tables, so no, you cannot append either.

As mentioned, the easiest way would be to establish a link to the server
table and perform a local query.

You can use the sample to create the link:

|* DoCmd.TransferDatabase acLink, "ODBC Database", _
|* *"ODBC;Driver={SQL Server};Server=Instance\YourServer;" & _
|* *"Database=YourDB;UID=USERID;PWD=PWD;", _
|* *acTable, "empl_Lst", "empl_Lst", , True

--
Peter Doering [MVP Access]
Actualy I've found a way:
In the GUI, I've create an action query that uses the pass-through
query.
From there, I can run it: It will run the pass-through as pass-through
and will append (or create) a table.
It is not a "direct data dump" from the pass-through but it does the
job.
cheers
Jul 30 '08 #13
magickarle wrote:
Peter Doering wrote:
>magickarlewrote:
>>Peter Doering wrote:
>>>You cannot create a *local* table using pass-through (PT). If you need
TblTemp in your local mdb the easiest would be a standard query on the
linked table empl_Lst.
>>If it's not possible to create a local table, then would it be
possible to append to an access table the output of a pass-through
query?

PT means that all control is handed over to the target Server and it
doesn't know about your local tables, so no, you cannot append either.

As mentioned, the easiest way would be to establish a link to the server
table and perform a local query.

You can use the sample to create the link:

|* DoCmd.TransferDatabase acLink, "ODBC Database", _
|* *"ODBC;Driver={SQL Server};Server=Instance\YourServer;" & _
|* *"Database=YourDB;UID=USERID;PWD=PWD;", _
|* *acTable, "empl_Lst", "empl_Lst", , True

Actualy I've found a way:
In the GUI, ...
of Access?
... I've create an action query that uses the pass-through
query.
From there, I can run it: It will run the pass-through as pass-through
and will append (or create) a table.
It will append (or create) a table on the server that you have passed the
query through to.
It is not a "direct data dump" from the pass-through but it does the
job.
Good for you.

--
Peter Doering [MVP Access]
Jul 30 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeppe | last post by:
Hi @ll, I'm investigating the possibility to call a struts action on a web environment from a standalone java application. I need to make this call automatically, from a crontab (on unix)....
1
by: Jamie Bissett | last post by:
I have written an installer class that I invoke as a custom action. I have asses 2 screens in the installation process that pass data to this Installer Class. I have succesfully debugged the...
8
by: McGrull | last post by:
Sorry for my question, but I'm really a newbie on ASP. I need to make a simple page (for IIS 5.0 and up, but even for 2000 Professional IIS) that read and display the files contained in a...
2
by: Sascha | last post by:
hello ng i have a group of 6 radiobuttons with different values. when i check a radiobutton, i have to calculate something with the value of the new ckecked radiobutton. can please someone...
1
by: astro | last post by:
I am trapping the rowchanged event on a table. I have the following code: If e.Action = DataRowAction.Add Then ds.Merge(CType(sender, DataTable).Select("", "",...
6
by: Belebele | last post by:
Suppose I want to use some object's member function as the action passed to a for_each call: class A { ... public: void foo(int ); }; A a;
9
by: finerrecliner | last post by:
i'm trying to make an action listener that will display an alert box when the user clicks anywhere on the page once, and then go back to normal mouse behavior. i have this: <html><script...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
0
kaleeswaran
by: kaleeswaran | last post by:
Hi! i want to pass the value from the java action class to java class.i don't know how to pass the value .... can any one give me the solution else give the me sample...
0
by: azoapes | last post by:
Hi, I've made a Setup Project to my C# WinApp and added a custom dialog to it that asks for user/pass for a database server. Then I created a Custom Action class and override the Install() to check...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.