473,378 Members | 1,470 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,378 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 1368
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...

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.