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.

Re: Pass data between tables by Curt_C

Curt_C
Fri Dec 10 14:46:04 CST 2004

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" <Rookie@discussions.microsoft.com> wrote in message
news:D8650540-4231-41E4-B08D-6FE5991D3D31@microsoft.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.



Re: Pass data between tables by Rookie

Rookie
Fri Dec 10 14:53:05 CST 2004

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" <Rookie@discussions.microsoft.com> wrote in message
> news:D8650540-4231-41E4-B08D-6FE5991D3D31@microsoft.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.
>
>
>

Re: Pass data between tables by Rookie

Rookie
Fri Dec 10 14:53:04 CST 2004

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....


Re: Pass data between tables by Rookie

Rookie
Fri Dec 10 14:55:02 CST 2004

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...


Re: Pass data between tables by Curt_C

Curt_C
Fri Dec 10 14:59:42 CST 2004

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" <Rookie@discussions.microsoft.com> wrote in message
news:0241B502-7725-47FC-8339-E7B9D2A39122@microsoft.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....
>



Re: Pass data between tables by Rookie

Rookie
Fri Dec 10 15:19:02 CST 2004

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
%>

Re: Pass data between tables by Curt_C

Curt_C
Fri Dec 10 15:29:39 CST 2004

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" <Rookie@discussions.microsoft.com> wrote in message
news:85E549BC-94D2-4054-A3A0-854B340B5630@microsoft.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
> %>



Re: Pass data between tables by Rookie

Rookie
Fri Dec 10 16:37:01 CST 2004

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" <Rookie@discussions.microsoft.com> wrote in message
> news:85E549BC-94D2-4054-A3A0-854B340B5630@microsoft.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
> > %>
>
>
>