![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Have you tried using passthrough queries? I have a similar situation with a remote Oracle server, and I changed to using passthrough queries to get my job done. The time difference was incredible. My inserts went from around 20mins to a few seconds. The other thing I have used that was very helpful was transactions in ADO. Set your connection, make your recordset, start a transaction, add the rows (900 should be no issue to do in one hit), commit the transaction, close the connection. The ADO method was approx 2 mins for the same job. Passthrough was definitely the fastest. Cheers The Frog |
#4
| |||
| |||
|
|
Have you tried using passthrough queries? I have a similar situation with a remote Oracle server, and I changed to using passthrough queries to get my job done. The time difference was incredible. My inserts went from around 20mins to a few seconds. The other thing I have used that was very helpful was transactions in ADO. Set your connection, make your recordset, start a transaction, add the rows (900 should be no issue to do in one hit), commit the transaction, close the connection. The ADO method was approx 2 mins for the same job. Passthrough was definitely the fastest. Cheers The Frog |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
? I would create the table local, and then try via a linked table do an append query. |
#7
| |||
| |||
|
|
That's how I presently do it. |
|
On 12/10/10 7:25 PM, Albert D. Kallal wrote: ? I would create the table local, and then try via a linked table do an append query. |
#8
| |||
| |||
|
|
?"Ryan" wrote in message news:idumpg$e1s$1 (AT) news (DOT) eternal-september.org... That's how I presently do it. On 12/10/10 7:25 PM, Albert D. Kallal wrote: ? I would create the table local, and then try via a linked table do an append query. The code you posted hints that you running an sql command over and over. You have: CurrentDb.Execute "tmpquery" rst2.MoveNext I saying to create all the data into a temp local table, and then do ONE append query, NOT execute a query over and over as you have in a loop (which as you already found out is very slow). |
#9
| |||
| |||
|
|
Yes. The way I do it "normally" (the SLOW way) is via a linked SQL table and a local temp table in access. Then I just have a query that inserts the data from the local temp table to the linked SQL Table. Apparently this uses DAO (or some other method) to do the inserts row by row, rather than a bulk insert. The code below was an attempt to use sql passthrough, even though it's line by line I was hoping it was faster. (it's not) |
#10
| |||
| |||
|
|
I've got a small access front end I've written that takes data out of our local SQL Server 2008 production database and stores it in some temporary tables. Then what the next step in the process is, is to take the data in the temp tables, do the appropriate joins and insert it into a couple tables on a SQL Server 2008 instance on my hosting provider. My problem is: Updating a table with 900 rows takes about 2 minutes (slow over T1 if you ask me). This is just using some Access Query's with linked tables. My next step was to connect to the remote instance via ADO and 'loop' through my local tables to the remote tables. This doesn't seem to ahve increased speed. The next recommendation was to pass the columns as parameters to a stored procedure. That's what I'm presently working on, however every time I go to execute my ADODB.command definition I get a syntax error / access denied message. Even if I feed it erroneous data that I know would fit appropriately in the columns such as "bear", "dog", "cat" into varchar(50) fields. In short: Can anyone recommend a way that might be easier/faster to add this data to my remote system. I do this several times a day and since it runs on my workstation it's becoming a hinderance now that the tables are actually growing. Any suggestions on a better method, or tips on a method mentioned above are greatly appreciated. -Ryan I would investigate using a passthrough query to execute an insert statement |
![]() |
| Thread Tools | |
| Display Modes | |
| |