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