Ask a Question related to ASP Database, Design and Development.
-
Gary #1
ASP Web Form - looking for ideas.
Hello Group, been lurking for a while now, great source of info. A little
help if you will?
I have two tables:
Applicant1
Applicant2
I have one form with details for App1 and App2.
Can I somehow insert the necessary values from the App1 fields into table1
and the App2 fields into table2? Does not seem obvious, I have a work
around which I am going to design should I find no easier way.
My work around:
Create the form with both App1 and App2 fields present. onSubmit I shall
store App1 values in Table1 AND record ALL App2 fields as Session Values. I
will then redirect to "Table2Parse.asp" and have a hidden form take the
Session Values and automatically submit them to Table2 and redirect to a
thank you URL.
This seems logical to me, I think I can have it done in an hour or so, just
not sure if this is the best way to proceed.
Anyone else have any thoughts? I NEED to have two separate tables for
compatibility reasons, and I don't want to split the data from a third table
using queries.
Thanks for any advice offered!
Gary Whittle.
[url]www.24it.co.uk[/url] - site officially launching soon.
Gary Guest
-
Any ideas?
Hi Does anybody know how the animation on the following website was done? I know that masking and a certain amount of tweening was used, but... -
other ideas
Any other suggestions? Please see previous post for code. -
X ideas
Hello Looking to run X windows on a debian 3.0 for a older machine with a 4 meg video. Its for a server so i want a smallest x server to take up... -
Any ideas on this?
How would i go about creating this? I have a table, within each cell there is an image spacer set to 20 x 20 px the same dimensions of the... -
Any ideas on how this is done?
Nice content manager, looking for ideas on how it is made... http://www.101ltd.com/smartwebb/smartcontent/smartcontent.asp -- Seth Meranda... -
Bob Barrows #2
Re: ASP Web Form - looking for ideas.
No, no, no, no, no.
Why bother submitting to a second page? Please provide some details about
a) the database type(s) and version(s) - this should be de rigeur on a db
list
b) the locations of table1 and table2 - are they in separate databases?
separate servers?
hint: you can open multiple connections on the same page if necessary. You
can even close a connection and reopen it with a different connection string
if that's necessary. I don't know what you need to do without the above
information.
Bob Barrows
Gary wrote:> Hello Group, been lurking for a while now, great source of info. A
> little help if you will?
>
> I have two tables:
> Applicant1
> Applicant2
>
> I have one form with details for App1 and App2.
>
> Can I somehow insert the necessary values from the App1 fields into
> table1 and the App2 fields into table2? Does not seem obvious, I
> have a work around which I am going to design should I find no easier
> way.
>
> My work around:
> Create the form with both App1 and App2 fields present. onSubmit I
> shall store App1 values in Table1 AND record ALL App2 fields as
> Session Values. I will then redirect to "Table2Parse.asp" and have a
> hidden form take the Session Values and automatically submit them to
> Table2 and redirect to a thank you URL.
>
> This seems logical to me, I think I can have it done in an hour or
> so, just not sure if this is the best way to proceed.
>
> Anyone else have any thoughts? I NEED to have two separate tables for
> compatibility reasons, and I don't want to split the data from a
> third table using queries.
>
> Thanks for any advice offered!
>
> Gary Whittle.
> [url]www.24it.co.uk[/url] - site officially launching soon.
Bob Barrows Guest
-
Gary #3
Re: ASP Web Form - looking for ideas.
Hello.
MySQL database, 2 tables in same database.
I will try and put your logic to the test, see how far I get :)
Thanks,
Gary.
"Bob Barrows" <reb_01501@yahoo.com> wrote in message
news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...string> No, no, no, no, no.
>
> Why bother submitting to a second page? Please provide some details about
> a) the database type(s) and version(s) - this should be de rigeur on a db
> list
> b) the locations of table1 and table2 - are they in separate databases?
> separate servers?
>
> hint: you can open multiple connections on the same page if necessary. You
> can even close a connection and reopen it with a different connection> if that's necessary. I don't know what you need to do without the above
> information.
>
> Bob Barrows
>
>
> Gary wrote:>> > Hello Group, been lurking for a while now, great source of info. A
> > little help if you will?
> >
> > I have two tables:
> > Applicant1
> > Applicant2
> >
> > I have one form with details for App1 and App2.
> >
> > Can I somehow insert the necessary values from the App1 fields into
> > table1 and the App2 fields into table2? Does not seem obvious, I
> > have a work around which I am going to design should I find no easier
> > way.
> >
> > My work around:
> > Create the form with both App1 and App2 fields present. onSubmit I
> > shall store App1 values in Table1 AND record ALL App2 fields as
> > Session Values. I will then redirect to "Table2Parse.asp" and have a
> > hidden form take the Session Values and automatically submit them to
> > Table2 and redirect to a thank you URL.
> >
> > This seems logical to me, I think I can have it done in an hour or
> > so, just not sure if this is the best way to proceed.
> >
> > Anyone else have any thoughts? I NEED to have two separate tables for
> > compatibility reasons, and I don't want to split the data from a
> > third table using queries.
> >
> > Thanks for any advice offered!
> >
> > Gary Whittle.
> > [url]www.24it.co.uk[/url] - site officially launching soon.
>
>
Gary Guest
-
Chris Hohmann #4
Re: ASP Web Form - looking for ideas.
"Gary" <gary@nospam.co.uk> wrote in message
news:mSxMa.916$jE1.7119875@news-text.cableinet.net...little> Hello Group, been lurking for a while now, great source of info. Atable1> help if you will?
>
> I have two tables:
> Applicant1
> Applicant2
>
> I have one form with details for App1 and App2.
>
> Can I somehow insert the necessary values from the App1 fields intoshall> and the App2 fields into table2? Does not seem obvious, I have a work
> around which I am going to design should I find no easier way.
>
> My work around:
> Create the form with both App1 and App2 fields present. onSubmit IValues. I> store App1 values in Table1 AND record ALL App2 fields as Sessionthe> will then redirect to "Table2Parse.asp" and have a hidden form takea> Session Values and automatically submit them to Table2 and redirect tojust> thank you URL.
>
> This seems logical to me, I think I can have it done in an hour or so,table> not sure if this is the best way to proceed.
>
> Anyone else have any thoughts? I NEED to have two separate tables for
> compatibility reasons, and I don't want to split the data from a thirdWhat database? What version? What do the tables look like? What data> using queries.
>
> Thanks for any advice offered!
>
> Gary Whittle.
> [url]www.24it.co.uk[/url] - site officially launching soon.
>
>
need to be inserted into each table? Without these particulars it's
difficult to provide a cogent response. Here's some pseudo code:
<-- Begin InsertApp1ANDApp2.asp -->
On Error Resume Next
Dim cn,strMsg,oError,strURL
Set cn=CreateObject("ADODB.Connection")
With cn
..Open strConn <-- your connection string here
..BeginTrans
'Call stored procedure perform an insert on App1
..spApp1Insert _
Request.Form("App1Value1"),_
Request.Form("App1Value2"),_
Request.Form("App1Value3"),_
Request.Form("App1Value4")
'Call stored procedure perform an insert on App2
..spApp2Insert _
Request.Form("App2Value1"),_
Request.Form("App2Value2"),_
Request.Form("App2Value3"),_
Request.Form("App2Value4")
'If an error was encountered rollback the transaction
'and generate the error message
If Err Then
..RollbackTrans
strMsg = strMsg & "Insert failed with the following error(s):" & vbCRLF
strMsg = strMsg & Err.Description & vbCRLF
For Each oError In .Errors
strMsg = strMsg & oError.Description & vbCRLF
Next
strURL = "InsertFailure.asp"
'If no error were encountered commit the transaction
'and generate a confirmation message
Else
..CommitTrans
strMsg = "Insert Succeeded"
strURL = "InsertSuccess.asp"
End If
End With
cn.Close : Set cn = nothing
'Store message in session variable so it can be accessed
'on the next page and redirect accordingly.
Session("Message") = strMsg
Response.Redirect strURL
<-- End InsertApp1ANDApp2.asp -->
Chris Hohmann Guest
-
Bob Barrows #5
Re: ASP Web Form - looking for ideas.
You don't even need a separate connection. Both tables are in the same
database. Just run two insert or update statements (whichever is relevant),
each pointing at the appropriate table.
Where did you get the idea that you could only perform a single database
action per page? If it was a book, we need to know so we can advise people
not to read that book? :-)
Gary wrote:> Hello.
>
> MySQL database, 2 tables in same database.
> I will try and put your logic to the test, see how far I get :)
>
> Thanks,
>
> Gary.
>
> "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...>> No, no, no, no, no.
>>
>> Why bother submitting to a second page? Please provide some details
>> about a) the database type(s) and version(s) - this should be de
>> rigeur on a db list
>> b) the locations of table1 and table2 - are they in separate
>> databases? separate servers?
>>
>> hint: you can open multiple connections on the same page if
>> necessary. You can even close a connection and reopen it with a
>> different connection string if that's necessary. I don't know what
>> you need to do without the above information.
>>
>> Bob Barrows
>>
>>
>> Gary wrote:>>> Hello Group, been lurking for a while now, great source of info. A
>>> little help if you will?
>>>
>>> I have two tables:
>>> Applicant1
>>> Applicant2
>>>
>>> I have one form with details for App1 and App2.
>>>
>>> Can I somehow insert the necessary values from the App1 fields into
>>> table1 and the App2 fields into table2? Does not seem obvious, I
>>> have a work around which I am going to design should I find no
>>> easier way.
>>>
>>> My work around:
>>> Create the form with both App1 and App2 fields present. onSubmit I
>>> shall store App1 values in Table1 AND record ALL App2 fields as
>>> Session Values. I will then redirect to "Table2Parse.asp" and have
>>> a hidden form take the Session Values and automatically submit them
>>> to Table2 and redirect to a thank you URL.
>>>
>>> This seems logical to me, I think I can have it done in an hour or
>>> so, just not sure if this is the best way to proceed.
>>>
>>> Anyone else have any thoughts? I NEED to have two separate tables
>>> for compatibility reasons, and I don't want to split the data from a
>>> third table using queries.
>>>
>>> Thanks for any advice offered!
>>>
>>> Gary Whittle.
>>> [url]www.24it.co.uk[/url] - site officially launching soon.
Bob Barrows Guest
-
Gary Whittle #6
Re: ASP Web Form - looking for ideas.
I am self taught, learning the ropes as I go - newsgroups are always great
help :)
Thanks,
Gary.
"Bob Barrows" <reb_01501@yahoo.com> wrote in message
news:epbxqrIQDHA.1148@TK2MSFTNGP11.phx.gbl...relevant),> You don't even need a separate connection. Both tables are in the same
> database. Just run two insert or update statements (whichever is> each pointing at the appropriate table.
>
> Where did you get the idea that you could only perform a single database
> action per page? If it was a book, we need to know so we can advise people
> not to read that book? :-)
>
> Gary wrote:>> > Hello.
> >
> > MySQL database, 2 tables in same database.
> > I will try and put your logic to the test, see how far I get :)
> >
> > Thanks,
> >
> > Gary.
> >
> > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
> > news:eVHv1fIQDHA.2852@tk2msftngp13.phx.gbl...> >> No, no, no, no, no.
> >>
> >> Why bother submitting to a second page? Please provide some details
> >> about a) the database type(s) and version(s) - this should be de
> >> rigeur on a db list
> >> b) the locations of table1 and table2 - are they in separate
> >> databases? separate servers?
> >>
> >> hint: you can open multiple connections on the same page if
> >> necessary. You can even close a connection and reopen it with a
> >> different connection string if that's necessary. I don't know what
> >> you need to do without the above information.
> >>
> >> Bob Barrows
> >>
> >>
> >> Gary wrote:
> >>> Hello Group, been lurking for a while now, great source of info. A
> >>> little help if you will?
> >>>
> >>> I have two tables:
> >>> Applicant1
> >>> Applicant2
> >>>
> >>> I have one form with details for App1 and App2.
> >>>
> >>> Can I somehow insert the necessary values from the App1 fields into
> >>> table1 and the App2 fields into table2? Does not seem obvious, I
> >>> have a work around which I am going to design should I find no
> >>> easier way.
> >>>
> >>> My work around:
> >>> Create the form with both App1 and App2 fields present. onSubmit I
> >>> shall store App1 values in Table1 AND record ALL App2 fields as
> >>> Session Values. I will then redirect to "Table2Parse.asp" and have
> >>> a hidden form take the Session Values and automatically submit them
> >>> to Table2 and redirect to a thank you URL.
> >>>
> >>> This seems logical to me, I think I can have it done in an hour or
> >>> so, just not sure if this is the best way to proceed.
> >>>
> >>> Anyone else have any thoughts? I NEED to have two separate tables
> >>> for compatibility reasons, and I don't want to split the data from a
> >>> third table using queries.
> >>>
> >>> Thanks for any advice offered!
> >>>
> >>> Gary Whittle.
> >>> [url]www.24it.co.uk[/url] - site officially launching soon.
>
>
Gary Whittle Guest



Reply With Quote

