473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I check the length of a Field in a Table

Hi!,

I just want to display (in a DataGrid) the length and Type (e.g.
Type=Char Length=10) of all the fields in my database table. I have
already made a DataTable using the DataAdapter Fill command. So how
can I do it.

Your kind help will be highly appreciated.
cheers

SY
Nov 22 '05 #1
4 1369
read the database schema

http://www.dotnetextreme.com/code/getdbschema.asp

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Sajid" <sa*********@yahoo.com> wrote in message
news:e0**************************@posting.google.c om...
Hi!,

I just want to display (in a DataGrid) the length and Type (e.g.
Type=Char Length=10) of all the fields in my database table. I have
already made a DataTable using the DataAdapter Fill command. So how
can I do it.

Your kind help will be highly appreciated.
cheers

SY

Nov 22 '05 #2
read the database schema

http://www.dotnetextreme.com/code/getdbschema.asp

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Sajid" <sa*********@yahoo.com> wrote in message
news:e0**************************@posting.google.c om...
Hi!,

I just want to display (in a DataGrid) the length and Type (e.g.
Type=Char Length=10) of all the fields in my database table. I have
already made a DataTable using the DataAdapter Fill command. So how
can I do it.

Your kind help will be highly appreciated.
cheers

SY

Nov 22 '05 #3
Hi!,

Thanks for replying back. Is there any equivalent command available for ODBC?

cheers

SY

"John Timney \(Microsoft MVP\)" <ti*****@despammed.com> wrote in message news:<OQ**************@TK2MSFTNGP10.phx.gbl>...
read the database schema

http://www.dotnetextreme.com/code/getdbschema.asp

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Sajid" <sa*********@yahoo.com> wrote in message
news:e0**************************@posting.google.c om...
Hi!,

I just want to display (in a DataGrid) the length and Type (e.g.
Type=Char Length=10) of all the fields in my database table. I have
already made a DataTable using the DataAdapter Fill command. So how
can I do it.

Your kind help will be highly appreciated.
cheers

SY

Nov 22 '05 #4
Hi!,

Thanks for replying back. Is there any equivalent command available for ODBC?

cheers

SY

"John Timney \(Microsoft MVP\)" <ti*****@despammed.com> wrote in message news:<OQ**************@TK2MSFTNGP10.phx.gbl>...
read the database schema

http://www.dotnetextreme.com/code/getdbschema.asp

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Sajid" <sa*********@yahoo.com> wrote in message
news:e0**************************@posting.google.c om...
Hi!,

I just want to display (in a DataGrid) the length and Type (e.g.
Type=Char Length=10) of all the fields in my database table. I have
already made a DataTable using the DataAdapter Fill command. So how
can I do it.

Your kind help will be highly appreciated.
cheers

SY

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Randell D. | last post by:
Folks, I've heard of buffer overflows being used/abused by hackers and believe one method to reduce this from happening is to check the length of my form data before writing it to my MySQL...
5
by: Edward Mitchell | last post by:
I have a database with text string fields defined by varchar(nnn). When I request from the user the text from a textbox, I'd like to set the maximum number of characters in the textbox to the...
5
by: Steve Wylie | last post by:
I am constructing an HTML questionnaire and one of the questions requires people to rate some choices from 1 to 5, where 1 is their favourite and 5 is their least favourite: Car Bus Taxi cab...
2
by: Paul Telco | last post by:
Hello, I'm a new user designing a simple database to retrieve pre-prepared docunents for printing. I have five tables, a form to design the documents, a form to customise and retrieve the...
5
by: Krechting | last post by:
Hi ALl, I have a code that checks if the documents in a hyperlink field are still where they should be. I use fileexist(). First I want to filter out all the hyperlink fields that are empty. I...
2
by: Robert Fitzpatrick | last post by:
I have a field in my pgsql 7.4.2 table that is char(6) type. This holds an ID that contains only numbers, but must be six characters in length. First two chars are the year followed by a sequential...
2
by: John | last post by:
Hi Everyone, I have a question about dynamically changing the length of a varchar(n) field, in case the value I'm trying to insert is too big and will give a "truncated" error, but before the...
3
by: imtmub | last post by:
Hi All, I am facing some problem in the field data(Description field in Item table). In that table one field(Description field)data legth is 255 and type: nvarchar. In some operation this field data...
4
by: plumba | last post by:
Let me explain.... I have a form (most of which you guys have helped me with!!). The initial problem I was having is that it was holding the data in the fields after submit, I resolved this by...
1
by: Anuj | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.