D
dmiller23462
Somebody take a look and give me any suggestions? My brain is nuked...
Here's my deal....I have online submission forms on my intranet at
work here....I am appending to an Access DB with the input from all
HTML fields and then querying aforementioned DB with different
variables (search by name, wave, reason, etc). The output that I'm
getting (SELECT * 'cause I need all of the data included in the
search) I would like to display in a nice table or array but I'm not
quite sure how to make those settings "dynamic", for lack of a better
word. What I mean is, the form is used at various times throughout the
day so I don't want to put a cap on the array rows and columns since
they will be constantly increasing. Any suggestions?
Here's the code I have right now (I was playing around with display
ideas) and the table is the basic way I want it but the columns change
to fit whatever data is in them....That's not good, I want a RIGID
column that will be unwavering in it's data display...
Throw me a bone here...Thanks guys...
<%
Mode = request.form("mode")
Name = request.form("name")
Shift = request.form("shift")
Wave = request.form("wave")
Carton = request.form("carton")
Location = request.form("location")
License = request.form("license")
Sku = request.form("sku")
Qty = request.form("quantity")
Reason = request.form("reason")
Comments = request.form("comments")
'*****************************************************************************
'* DATABASE APPENDING
*
'*****************************************************************************
'create db connection
Set dbconn = Server.CreateObject("ADODB.Connection")
'open db in a DSN-less method
dbconn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&
Server.MapPath("/jax/wh/Online_Forms/Secured_Archives/search_files/shortage_test.mdb")
'sql statement to return input values drawn from html fields
SQLqry = "SELECT * from test_data WHERE name LIKE '%%"&name&"%%'"
'display results of statement on screen for testing purposes
'Response.Write "<h3><b><u>" & (SQLqry) & "</u></b></h3><br>"
'remind db who it works for
Set rs = dbconn.Execute(SQLqry)
While Not rs.EOF
Response.Write "<table border='1'>"
Response.Write "<tr><td><b>Name:</b> " & rs("name")
Response.Write "<td>"
Response.Write "<b>Days/Nights:</b> " & rs("shift")
Response.Write "<td>"
Response.Write "<b>Wave Number:</b> " & rs("wave")
Response.Write "<td>"
Response.Write "<b>Carton Number:</b> " & rs("carton")
Response.Write "<td>"
Response.Write "<b>Location:</b> " & rs("location")
Response.Write "<td>"
Response.Write "<b>License:</b> " & rs("license")
Response.Write "<td>"
Response.Write "<b>SKU:</b> " & rs("sku")
Response.Write "<td>"
Response.Write "<b>Quantity:</b> " & rs("qty")
Response.Write "<td>"
Response.Write "<b>Reason:</b> " & rs("reason")
Response.Write "<td>"
Response.Write "<b>Comments:</b> " & rs("comments")
Response.Write "<td>"
Response.Write "<b>Date Submitted:</b> " & rs("date")
Response.Write "</td></table>"
rs.MoveNext
Wend
'smack around the db connection until it lets go
dbconn.Close
'terminate db connection with extreme prejudice
set dbconn = nothing
%>
Here's my deal....I have online submission forms on my intranet at
work here....I am appending to an Access DB with the input from all
HTML fields and then querying aforementioned DB with different
variables (search by name, wave, reason, etc). The output that I'm
getting (SELECT * 'cause I need all of the data included in the
search) I would like to display in a nice table or array but I'm not
quite sure how to make those settings "dynamic", for lack of a better
word. What I mean is, the form is used at various times throughout the
day so I don't want to put a cap on the array rows and columns since
they will be constantly increasing. Any suggestions?
Here's the code I have right now (I was playing around with display
ideas) and the table is the basic way I want it but the columns change
to fit whatever data is in them....That's not good, I want a RIGID
column that will be unwavering in it's data display...
Throw me a bone here...Thanks guys...
<%
Mode = request.form("mode")
Name = request.form("name")
Shift = request.form("shift")
Wave = request.form("wave")
Carton = request.form("carton")
Location = request.form("location")
License = request.form("license")
Sku = request.form("sku")
Qty = request.form("quantity")
Reason = request.form("reason")
Comments = request.form("comments")
'*****************************************************************************
'* DATABASE APPENDING
*
'*****************************************************************************
'create db connection
Set dbconn = Server.CreateObject("ADODB.Connection")
'open db in a DSN-less method
dbconn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&
Server.MapPath("/jax/wh/Online_Forms/Secured_Archives/search_files/shortage_test.mdb")
'sql statement to return input values drawn from html fields
SQLqry = "SELECT * from test_data WHERE name LIKE '%%"&name&"%%'"
'display results of statement on screen for testing purposes
'Response.Write "<h3><b><u>" & (SQLqry) & "</u></b></h3><br>"
'remind db who it works for
Set rs = dbconn.Execute(SQLqry)
While Not rs.EOF
Response.Write "<table border='1'>"
Response.Write "<tr><td><b>Name:</b> " & rs("name")
Response.Write "<td>"
Response.Write "<b>Days/Nights:</b> " & rs("shift")
Response.Write "<td>"
Response.Write "<b>Wave Number:</b> " & rs("wave")
Response.Write "<td>"
Response.Write "<b>Carton Number:</b> " & rs("carton")
Response.Write "<td>"
Response.Write "<b>Location:</b> " & rs("location")
Response.Write "<td>"
Response.Write "<b>License:</b> " & rs("license")
Response.Write "<td>"
Response.Write "<b>SKU:</b> " & rs("sku")
Response.Write "<td>"
Response.Write "<b>Quantity:</b> " & rs("qty")
Response.Write "<td>"
Response.Write "<b>Reason:</b> " & rs("reason")
Response.Write "<td>"
Response.Write "<b>Comments:</b> " & rs("comments")
Response.Write "<td>"
Response.Write "<b>Date Submitted:</b> " & rs("date")
Response.Write "</td></table>"
rs.MoveNext
Wend
'smack around the db connection until it lets go
dbconn.Close
'terminate db connection with extreme prejudice
set dbconn = nothing
%>