\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Error getting the defined size of a varchar field


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
Hi all
\r\n
\r\nI am using AdoDB objects and MySQL. When I try to get the length of a field using the defined size property of the recordset object it works fine, but when the fields is a varchar, i only get the length of the largest field i have in the database
\r\n
\r\nfor example, i have a field that is a varchar(100), but the defined size returns me 5 if I the largest field that I have is "Hello"
\r\n
\r\nIs this normal, and, there is a way to get the real defined size of the field?
\r\n
\r\n
\r\nThanks
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n
\r\n __________________
\r\n Pri Oh Persia\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[733477] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 05-02-2004, 12:39 PM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
MKoslof\'s Avatar\r\n\r\n
\r\n \r\n MKoslof\r\n MKoslof is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 05-01-2004, 05:59 PM
Peperl's Avatar
Peperl Peperl is offline
Senior Contributor
 
Join Date: Apr 2003
Location: Cartagena, Spain
Posts: 1,371
Default Error getting the defined size of a varchar field


Hi all

I am using AdoDB objects and MySQL. When I try to get the length of a field using the defined size property of the recordset object it works fine, but when the fields is a varchar, i only get the length of the largest field i have in the database

for example, i have a field that is a varchar(100), but the defined size returns me 5 if I the largest field that I have is "Hello"

Is this normal, and, there is a way to get the real defined size of the field?


Thanks
__________________
Pri Oh Persia
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the Size of a User Defined Type DeX General 2 01-20-2004 05:53 AM
Bloated binary files Success_Machine Tech Discussions 3 10-13-2003 08:00 AM
search within a memo field persub Database and Reporting 1 07-15-2002 10:24 PM
Problems with Date, varChar Type Field sethindeed Database and Reporting 4 09-17-2001 09:45 AM
field size mhyatt General 1 12-08-2000 12:37 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->