Click to See Complete Forum and Search --> : Hidden Fields in VB Script For Database


EssiX
July 10th, 2001, 01:47 PM
Hey all,
The access database I'm creating/manipulating gets data from a web form using a VB 6.0 script. On page 1 of the form, there are of course various fields to enter data into the corresponding access and VB fields. The function called by submitting the data on this page is called OpenSWE (which is in the VB program). This function, after retrieving that data, calls another Vb function, SendSecondForm, which of course sends part 2 of my database form, with fields to upload a file. This part 2 web page is designed to call a perl coded script instead of the VB script, in order to upload the file. However, I need to add the name of the file uploaded to the database, along with the info added from the first form page. Since I can't call both scripts, I needed to insert hidden fields to grab hold of the same data (uploaded file name, the variable is called "UpFile"). So far, I can upload, but not add the name of the file uploaded to the database, as I don't know enough how to code hidden fields. I understand, this is a pretty complicated database problem, and if any further clarification is needed on it, pleaz let me know =)...
Below is the code of my SendSecondForm function:

Sub SendSecondForm()

Send ("<BODY background=cork.jpg>")
Send ("<h1 align=center><u>Software Estimate Form Part 2</u>:</h1>")
Send ("<hr>")
Send ("<h2>Please Upload the Software Estimate File:</h2>")
Send ("<form method='POST' enctype='multipart/form-data' action='http://sw1/perl/bin/perl.exe?E:\APP-SW\SWestimates\fup.pl'>")
Send ("Software Estimate to Upload:      <input type=file name=UpFile>
")
Send ("Any Additional Notes on the File: <input type=text name=note>
")
Send ("
<input type=submit value='Press Here'> to Upload the File!")

Dim Query1 as Recordset
UpFile = GetFieldData(true, "UpFile")
Send ("<P>" & UpFile)
Query1![UpFile] = UpFile

'Link to View the file uploaded
'Send ("<table><tr><td>If You Wish to View the File You Uploaded:<td><input name=UpFile type=submit value=Press Here></td></table>")

'Hidden Fields for ID (auto-number) and also the Program Name
Send ("<input TYPE=""HIDDEN"" NAME=""ID"" VALUE=" & q & ID & q & ">")
Send ("<input TYPE=""HIDDEN"" NAME=""ProgramName"" VALUE=" & q & ProgramName & q & ">")

'set up a hidden field for the UpFile variable, add that data to the SWE Database
'Dim Query1 as Recordset
Send ("<input TYPE=""HIDDEN"" NAME=UpFile VALUE=UpFile>")
'UpFile = GetFieldData(true, "UpFile")
'Send ("<P>" & UpFile)
'Query1![UpFile] = UpFile

End Sub



Thanx for reading my post!
-Sameer