473,400 Members | 2,145 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,400 software developers and data experts.

Size of datacolumn

Hello,

I'd like to fill a dataset column with a product-description. Sometimes
the size of the description-text is longer than 255 characters. At that
length, the dataset automatically cuts off the text. Does anyone know
how I can use more than 255 characters in a dataset column?

Greetings,
Christian.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #1
8 4427
By setting DataColumn.MaxLength property to larger value perhaps?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Christian Dokman" <de****@developersdex.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hello,

I'd like to fill a dataset column with a product-description. Sometimes
the size of the description-text is longer than 255 characters. At that
length, the dataset automatically cuts off the text. Does anyone know
how I can use more than 255 characters in a dataset column?

Greetings,
Christian.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #2
I have tried setting that property already, but that doesn't work. Any
other suggestion?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
Hi Christian,

When exactly is text trimmed?
How do you know that it is trimmed?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Christian Dokman" <de****@developersdex.com> wrote in message
news:Oj**************@TK2MSFTNGP12.phx.gbl...
I have tried setting that property already, but that doesn't work. Any
other suggestion?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #4
Hi there,

Thanks for replying!

I use a Microsoft Access query to fill the dataset that is bound to the
datagrid. The query shows the product description just fine (more than
255 characters). When I use the fill method from a dataadapter and fill
the dataset, the dataset only shows the first 255 characters. I have
tried to create a dataset with datacolumns first and set the MaxLenght
property to 1000 and than fill the dataset, but that doesn't seem to
have any effect. Also setting the MaxLenght after filling the dataset
has no effect. Any idea how to solve this?

Greetings,
Christian Dokman
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5
Hi Christian,

What type is the Access column?
How does select look like?
How does connection string look like?

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Christian Dokman" <de****@developersdex.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi there,

Thanks for replying!

I use a Microsoft Access query to fill the dataset that is bound to the
datagrid. The query shows the product description just fine (more than
255 characters). When I use the fill method from a dataadapter and fill
the dataset, the dataset only shows the first 255 characters. I have
tried to create a dataset with datacolumns first and set the MaxLenght
property to 1000 and than fill the dataset, but that doesn't seem to
have any effect. Also setting the MaxLenght after filling the dataset
has no effect. Any idea how to solve this?

Greetings,
Christian Dokman
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #6
Hello,

I have a table with products. The table contains several columns. A
column with the product ID (datatype 'long'), a column with the product
name (datatype 'text') and a column with the product description (data
type 'memo').

My query shows the product id column and combines the product name and
description in 1 column as follows:

Product: txtName & ": " & memDescription

The query shows all data correct.

In ASP.NET I connect to the database (the connectionstring works fine):

dim conn as new oledb.oledbconnection(CONNECTIONSTRING)
dim da as new oledb.oledbdataadapter("SELECT * FROM qryProducts", conn)
dim ds as new dataset

da.fill(ds)

The 'Product' column in the query now shows all characters, but the
dataset only contains the first 255 characters.

Greetings,
Christian.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #7
Hi Christian,

You are correct. It really doesn't return more than 255 chars - actually it
returns garbage on position > 255.
It is probably an issue with jet oledb provider when concatenating text and
memo fields.
As a workaround try embedding your concatenation (inside query) into CStr()
or select fields separately.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Christian Dokman" <de****@developersdex.com> wrote in message
news:uP**************@TK2MSFTNGP11.phx.gbl...
Hello,

I have a table with products. The table contains several columns. A
column with the product ID (datatype 'long'), a column with the product
name (datatype 'text') and a column with the product description (data
type 'memo').

My query shows the product id column and combines the product name and
description in 1 column as follows:

Product: txtName & ": " & memDescription

The query shows all data correct.

In ASP.NET I connect to the database (the connectionstring works fine):

dim conn as new oledb.oledbconnection(CONNECTIONSTRING)
dim da as new oledb.oledbdataadapter("SELECT * FROM qryProducts", conn)
dim ds as new dataset

da.fill(ds)

The 'Product' column in the query now shows all characters, but the
dataset only contains the first 255 characters.

Greetings,
Christian.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #8
Hi there,

The Cstr() around it didn't work, so in the query I have devided the
productdescription column into 22 other columns (all of 250 characters,
because the product description can be up to 5250 characters!). In
ASP.NET I paste all columns into the one datasetcolumn with the
productdescription and now the datagrid shows the correct description!

This is indeed a workaround, but it works!

Thanks for all your help!

Greetings,
Christian

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #9

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

Similar topics

3
by: J | last post by:
Is there anyway to format a calculated datacolumn? I would like the following column to display as money (formatted as $#,##0.00). Or how about simply displaying the column formatted as a number...
1
by: Chris | last post by:
I'm having trouble Serializing a System.Data.DataColumn object. When I try to serialize it, I get the following: System.NotSupportedException: Cannot serialize member...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
4
by: bordsby | last post by:
Situation: I am using an OleDbDataAdapter to fill a DataSet's DataTable with data from an Access database. The DataSet's DataTable is bound to a DataGrid. After the OleDbDataAdapter.Fill method...
9
by: Christian Dokman | last post by:
Hello, I'd like to fill a dataset column with a product-description. Sometimes the size of the description-text is longer than 255 characters. At that length, the dataset automatically cuts off...
3
by: Raul | last post by:
In visual basic 6 xxx.recordset.fields(1). size and in the fields of type string it indicated you the maximum that allowed In. net opposing net anything resemblance. thank you
5
by: Gary Townsend | last post by:
I have been working on a way to take a datatable from a dataset and transform it into a Geography Markup Language(GML) stream so it can be loaded into another component. The problem i'm finding is...
3
by: DaveP | last post by:
im Trying to set a Datacolumn type for a new table boolean is not working, What is the correct waty //column.DataType = System.Type.GetType"System.Data.SqlTypes.SqlBoolean"); column.DataType...
0
by: SMH | last post by:
Hi All, I am currently learning .Net 2, studying for 70-528. I've hit a bit of a brick wall with DataColumn.Expression. As I understand it, this can be used to (For example) concatenate two...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.