html text box field truncates SQL varchar field via vb6 webclass write response. 
Author Message
 html text box field truncates SQL varchar field via vb6 webclass write response.

After retrieving a database value from SQL Server 6.5, a varchar 255, I
send it on to the client as illustrated by the code snippet :

rs.Open strOpenrs, cn, adOpenStatic, adLockReadOnly

With Response

.Write  Client Name <input type=""text"" name=""txtClientName""
maxlength=""40"" value= " & rs("Name") & " size=""40""><br>"

 I am using an .html file as a template and then dynamically generating the
text boxes which contain the database values via the rs("Name")   value
below.

The text boxes show the database values just fine as long as there is not
more than one word!
So if there is a field in the Name column that contains 'pineapple', that
shows up ok.
But if there is a field that contains "pineapple enchiladas are the best',
only pineapple shows up.........
I can't figure out why....... Adding maxlength and size didn't help at all.
Debugging in the VB6 Webitem respond method shows the database value has
been fetched correctly via the ADO connection and another html tag just
above it;

With Response
 .Write "<p><big>Values to view/edit/update for<em> <font
color=""#FF0080"">" & rs("Name") & "</font> </em>client</big></p>"

works just fine. So 'pineapple enchiladas are the best' is getting sent in
its entirety as the code snippet above proved, but not
as it is happens in the case of the text box. Can anyone help me with my
text box
blues............Yes, I want the whole enchilada!

By the way, although I used to use <% dbvariable %> back in the ancient days
of Interdev 1.0 .asp page creation after using the <script language =
VBScript RUNAT Server> processing directive. I haven't been able to figure
out how to get that to work within the webclass environment yet.

Thank you,
Greg Hazzard

ps. This is one time that I cross-posted just because my view of the
vb.6.webdevelopment
newsgroup shows no new entries for two days.......



Sat, 02 Jun 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. vb6-SQL value gets truncated in HTML text box via webclass response.write

2. Data in varchar(2000) field truncated at 255 characters on report

3. Crystal Reports 8.5 Truncates Varchar fields larger then 255 characters

4. Truncated Varchar(600) field to 255 Characters

5. varchar vs text fields for comments (SQL Server)

6. Writing To Text Field Via Recordset

7. Loading Rich Text Box from SQL Server 6.5 Text Field

8. Help - writing to text field / database field

9. Problems with large text fields (VARCHAR(1500) in Oracle with RDO 2.0

10. ADO, SQL 6.5 and VarChar Fields

11. Accessing MS SQL Server Text Fields via RDO

12. Accessing MS SQL Server Text Field via RDO

 

 
Powered by phpBB® Forum Software