var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: data from db1 to db2
I use SQL Server database and ASP
I have 3 views from 3 different databases:
V_Company1 from db1
V_ Company2 from db2
V_ Company3 from db3
I have created an other database where I want to Insert the result of the 3 views in a table named T_result from db4
Can anyone help me
open a connection to db4. objconn4
open a connection to db1. objconn
execute select query on objconn
execute insert query on objconn4
close connection to objconn
open connection to next db. objconn. repeat for all
with this code you can change the sqldb var to easily change between dbs
dim sqlserver, sqluser, sqlpwd, sqldb
dim sconn, srs
set sconn = CreateObject("ADODB.Connection") 'prep connection'
set srs = CreateObject("ADODB.Recordset") ' prep recordset'
sconn.open "PROVIDER=SQLOLEDB;DATA SOURCE=" & sqlserver & ";UID=" & sqluser &_
";PWD=" & sqlpwd & ";DATABASE=" & sqldb
"They say Moses split the Red Sea
I split the blunt and rolled the fat one, I'm deadly"
-- Tupac 'Blasphemy'
thank you csamuels and others,
I tried it it seems to work but only I have huge tables with 400.000 records for each table.
I have the error message: server time out (sql server). I set all the parmeters to 0, so the time is illimited as you know for the value 0.
I read something about updating using a batch or parchage but I have not enough information in order to use it.
may anyone help me to solve this.
Is there any way to solve this probleme??
Thans ks in adavance for your help