473,378 Members | 1,372 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,378 software developers and data experts.

Pass data between tables

This is my scenario:
I develop a .asp app that reads its data from an Access DB "A", and I have a
desktop app with a FoxPro DB "B".

How can I insert data from a table in DB "A" to a table in DB "B". Im new to
asp and I really know only the basic's, so who can guide me to a tutorial or
where can I dowload an example... it would be great.
Jul 22 '05 #1
8 1472
You'll have to establich connections to each. Pull the values from one,
structure them into a statement and insert them into the other. Dont think
of this as one process, but 2 seperate things.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rookie" <Ro****@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
This is my scenario:
I develop a .asp app that reads its data from an Access DB "A", and I have
a
desktop app with a FoxPro DB "B".

How can I insert data from a table in DB "A" to a table in DB "B". Im new
to
asp and I really know only the basic's, so who can guide me to a tutorial
or
where can I dowload an example... it would be great.

Jul 22 '05 #2
O.K. thanks...
now I know what to do... but can you help me on "how to do it ?"
I searched the web, but cant find an example of how to do it...

"Curt_C [MVP]" wrote:
You'll have to establich connections to each. Pull the values from one,
structure them into a statement and insert them into the other. Dont think
of this as one process, but 2 seperate things.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rookie" <Ro****@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
This is my scenario:
I develop a .asp app that reads its data from an Access DB "A", and I have
a
desktop app with a FoxPro DB "B".

How can I insert data from a table in DB "A" to a table in DB "B". Im new
to
asp and I really know only the basic's, so who can guide me to a tutorial
or
where can I dowload an example... it would be great.


Jul 22 '05 #3
O.K. thanks...
now I know what to do... but can you help me on "how to do it ?"
I searched the web, but cant find an example of how to do it....

Jul 22 '05 #4
O.K. thanks...
now I know what to do... but can you help me on "how to do it ?"
I searched the web, but cant find an example of how to do it...

Jul 22 '05 #5
what part... that's what I'm getting at. Do you not know how to open the
connections? how to read data? how to insert data? etc?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rookie" <Ro****@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
O.K. thanks...
now I know what to do... but can you help me on "how to do it ?"
I searched the web, but cant find an example of how to do it....

Jul 22 '05 #6
Im new in asp, and I dont know how to open more than one connection, and how
to "distinc" each one. I know that it should be something like this:

insert from db1.table1 field1, field2, field3 values db2.table1 field1,
field2, field3 where field1 = request.querystring("id_num")

This is my old code, it saves from a form to the database...
<%
'
' Open the database
'
set conn=server.createobject("adodb.connection")
conn.open("DBQ=" & server.mappath("Base.mdb") & _
";Driver={Microsoft Access Driver (*.mdb)};")
'
' user's information
'
v_name = request.form("name")
v_email = request.form("email")
v_age = request.form("age")
v_gender = request.form("gender")
v_comment = request.form("comment")
v_hideEmail = request.form("hideEmail")
'
' SQL INSERT query
'
conn.execute("insert into GuestBook " &_
"(name,email,hideEmail, age,gender,comment) " & _
"values (" & _
"'" & v_name & "'," & _
"'" & v_email & "'," & _
" " & v_hideEmail & " ," & _
" " & v_age & " ," & _
"'" & v_gender & "'," & _
"'" & v_comment & "')")
'
' Step 4: Close and exit the database
'
conn.close
set conn=nothing
%>
Jul 22 '05 #7
It's just a matter of

open connection to first fb
use sql query to first db
myStirng = rs("fieldFromDB")
close connection to first db

open connection to second db
use insert statement with myString as the value
close connection.

It looks like you have all the parts here already

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rookie" <Ro****@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
Im new in asp, and I dont know how to open more than one connection, and
how
to "distinc" each one. I know that it should be something like this:

insert from db1.table1 field1, field2, field3 values db2.table1 field1,
field2, field3 where field1 = request.querystring("id_num")

This is my old code, it saves from a form to the database...
<%
'
' Open the database
'
set conn=server.createobject("adodb.connection")
conn.open("DBQ=" & server.mappath("Base.mdb") & _
";Driver={Microsoft Access Driver (*.mdb)};")
'
' user's information
'
v_name = request.form("name")
v_email = request.form("email")
v_age = request.form("age")
v_gender = request.form("gender")
v_comment = request.form("comment")
v_hideEmail = request.form("hideEmail")
'
' SQL INSERT query
'
conn.execute("insert into GuestBook " &_
"(name,email,hideEmail, age,gender,comment) " & _
"values (" & _
"'" & v_name & "'," & _
"'" & v_email & "'," & _
" " & v_hideEmail & " ," & _
" " & v_age & " ," & _
"'" & v_gender & "'," & _
"'" & v_comment & "')")
'
' Step 4: Close and exit the database
'
conn.close
set conn=nothing
%>

Jul 22 '05 #8
Thanks to make me realize how "stupid" am I, I'm really new in asp, and "self
learning" is really hard,... Truth, I´m not a "great programmer" and was
expecting some help...

Thanks anyway...

"Curt_C [MVP]" wrote:
It's just a matter of

open connection to first fb
use sql query to first db
myStirng = rs("fieldFromDB")
close connection to first db

open connection to second db
use insert statement with myString as the value
close connection.

It looks like you have all the parts here already

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Rookie" <Ro****@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
Im new in asp, and I dont know how to open more than one connection, and
how
to "distinc" each one. I know that it should be something like this:

insert from db1.table1 field1, field2, field3 values db2.table1 field1,
field2, field3 where field1 = request.querystring("id_num")

This is my old code, it saves from a form to the database...
<%
'
' Open the database
'
set conn=server.createobject("adodb.connection")
conn.open("DBQ=" & server.mappath("Base.mdb") & _
";Driver={Microsoft Access Driver (*.mdb)};")
'
' user's information
'
v_name = request.form("name")
v_email = request.form("email")
v_age = request.form("age")
v_gender = request.form("gender")
v_comment = request.form("comment")
v_hideEmail = request.form("hideEmail")
'
' SQL INSERT query
'
conn.execute("insert into GuestBook " &_
"(name,email,hideEmail, age,gender,comment) " & _
"values (" & _
"'" & v_name & "'," & _
"'" & v_email & "'," & _
" " & v_hideEmail & " ," & _
" " & v_age & " ," & _
"'" & v_gender & "'," & _
"'" & v_comment & "')")
'
' Step 4: Close and exit the database
'
conn.close
set conn=nothing
%>


Jul 22 '05 #9

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

Similar topics

1
by: Jonathan Gibbs | last post by:
I'm very new to xml, and struggling a bit.. I want to use an .xsd file passed to a windows application to define a dataset's schema, and also (if possible) pass other metadata associated with...
3
by: dk | last post by:
Hi all, Would appreciate some advice on the following: I am trying to speed up an Access database connected to a SQL Server back-end. I know I can use a pass-through query to pass the sql...
2
by: Galina | last post by:
Hello I need to get data from 4 Oracle tables and combine them into a temporary table in my application. I get data using a pass-through query dynamically created in code: mySQL = "SELECT...
0
by: DraguVaso | last post by:
Hi, I need to relink a whole bunch of Access-Linked-Tables and Pass-Through-Query's to another ODBC with VB.NET I foudn alreaddy how to relink the Tables, and I thought the query's woudl be...
1
by: beachboy | last post by:
how can pass the login (security info) to secondary application? ASP.NET 1.1 user login to application 1(app1.myapp.com) with their username and password, then they have a link to application 2...
2
by: erick-flores | last post by:
Hello all I have an ODBC in Access of 18 tables from a FoxPro application. I dupplicate the tables from the FoxPro application so I can use the tables (put together a database) and send them to...
3
by: RAB | last post by:
I have filled a dataset with the following code in VB... ...... dim DataSet as System.Data.DataSet = new System.Data.DataSet dataAdapter.Fill (dataSet) dim MyInt as integer I want to...
4
by: computer_guy | last post by:
Hi Everyone, I am writing an HTMP page like below: ---------------Dynamic HTML Page report.aspx----------------------- 1. Complicated algorithm to generate data and store it in memory ...
12
by: ArunDhaJ | last post by:
Hi Friends, Is it possible to pass a table as a parameter to a funtion. whos function declaration would look some thing like this.... ALTER FUNCTION TempFunction (@TempTable TABLE, @nPId INT) ...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Have a complex process where I need to Import a large amount of data then run some transformations on this data then import into DataBase. The transformation involves multiple fields and multiple...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.