|
Prev: Wscript.Shell.run returns 254
Next: HTML Tab pages
From: u0107 on 18 Apr 2006 21:23 Hello all, I have an ASP generated form to maintain a back end Access Database. Some tables have Memo Type fields. On account of the limitations of the length of the URL String, I am unable to include user entered values of length greater than 2048 bytes in such memo fields in the URL. The technique I use: 1) Through ASP generate the Form in HTML. 2) Accept form element values. (two elements are Memo fields) 3) When Submit button is clicked, I pass control to a javascript function which extracts values from each of the form fields and assembles them into a URL String of the type "http://www.mysite.com/update_table_1.asp??field1name=some_field_name&field1value=some_value somefield2name=some_other_field_name&some_other_field_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj" 4) Now consider that the field "some_other_field_name" is a memo field and the value is really some 3K bytes long. (Of course I used URLEncode to encode the URL.) My question is how do I pass the value of this memo field to the update_table_1.asp code I am veering to using XHTML for the purpose - there are some solutions which are posted on other fora but right now they appear to complicated for me. Any simpler solution will be most welcome. Thanks in advance. Uttam -- u0107 ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------
From: Mike Brind on 19 Apr 2006 03:12 u0107 wrote: > Hello all, > > I have an ASP generated form to maintain a back end Access Database. > Some tables have Memo Type fields. > > On account of the limitations of the length of the URL String, I am > unable to include user entered values of length greater than 2048 bytes > in such memo fields in the URL. > > The technique I use: > > 1) Through ASP generate the Form in HTML. > 2) Accept form element values. (two elements are Memo fields) > 3) When Submit button is clicked, I pass control to a javascript > function which extracts values from each of the form fields and > assembles them into a URL String of the type > "http://www.mysite.com/update_table_1.asp??field1name=some_field_name&field1value=some_value > somefield2name=some_other_field_name&some_other_field_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj" > 4) Now consider that the field "some_other_field_name" is a memo field > and the value is really some 3K bytes long. (Of course I used > URLEncode to encode the URL.) > > My question is how do I pass the value of this memo field to the > update_table_1.asp code > > I am veering to using XHTML for the purpose - there are some solutions > which are posted on other fora but right now they appear to complicated > for me. > > Any simpler solution will be most welcome. > > Thanks in advance. > > Uttam > Why aren't you using the POST method for the form? -- Mike Brind
From: Aaron Bertrand [SQL Server MVP] on 21 Apr 2006 08:57 > 3) When Submit button is clicked, I pass control to a javascript > function which extracts values from each of the form fields and > assembles them into a URL String of the type > "http://www.mysite.com/update_table_1.asp??field1name=some_field_name&field1value=some_value > somefield2name=some_other_field_name&some_other_field_value=dsakfsakfdjdsasajdfklsajdflkdsjaaksj" > 4) Now consider that the field "some_other_field_name" is a memo field > and the value is really some 3K bytes long. (Of course I used > URLEncode to encode the URL.) > > My question is how do I pass the value of this memo field to the > update_table_1.asp code I have to agree with Mike. Why not just post the form to update_table_1.asp?
From: SpiderSwamy on 25 Apr 2006 02:19 Hi, I too think so that u can use the POST method, any way its u r wish. I have used a field called Expertise(Memo Datatype in MS Access) , I have used GET method so this field value will be there in URL, I will retrive that value add it to DB. Code: strExpertise = Request.querystring("Expertise") ' To get value from URL(that is query string) dim strCon,RSInsert,RSSeqID set strCon=server.CreateObject("ADODB.Connection") set RSInsert=server.CreateObject("ADODB.Recordset") set RSSeqID=server.CreateObject("ADODB.Recordset") Expertise=Request("Expertise") dsnStrin="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("repository.mdb") & ";" strCon.open dsnStrin RSInsert.Open "Select OHR_ID from registration", strCon RSInsert("Expertise")=Expertise I wish that this code may work for u.... Bye SpiderSwamy
From: SpiderSwamy on 25 Apr 2006 02:19
Hi, I too think so that u can use the POST method, any way its u r wish. I have used a field called Expertise(Memo Datatype in MS Access) , I have used GET method so this field value will be there in URL, I will retrive that value add it to DB. Code: strExpertise = Request.querystring("Expertise") ' To get value from URL(that is query string) dim strCon,RSInsert,RSSeqID set strCon=server.CreateObject("ADODB.Connection") set RSInsert=server.CreateObject("ADODB.Recordset") set RSSeqID=server.CreateObject("ADODB.Recordset") Expertise=Request("Expertise") dsnStrin="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & server.mappath("repository.mdb") & ";" strCon.open dsnStrin RSInsert.Open "Select OHR_ID from registration", strCon RSInsert("Expertise")=Expertise I wish that this code may work for u.... Bye SpiderSwamy |