473,396 Members | 1,852 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.

DataGrid showing "System.Byte[]" for a column that should be a str

JW
Ok, I hope this is something easy... but I have been staring at this for way
too long.

I have the following query ( ODBC conn setup to MySQL ):

SELECT MonthName(dateOfOrder) as month, SUM(cost) as sales FROM orderInfo,
imagesInOrder WHERE orderInfo.id=imagesInOrder.order_id Group By
Month(dateOfOrder)

which returns the following when I iterate over the OdbcDataReader:

June, 10.88
July, 22.96
August, 41.06

However, when I bind this query to a DataGrid, the DataGrid shows:

System.Byte[] $10.88
System.Byte[] $22.96
System.Byte[] $41.06

Any ideas? I don't understand why the correct string value ( i.e. the month
name ) is fine when I iterate over the OdbcDataReader, but when I bind it to
a grid it gets messed up?

Thanks much in advance,
Justin
Nov 18 '05 #1
1 2084
Why are you using ODBC to connect to mysql anyway heh, use MySQL.Net to
connect: http://www.sf.net/projects/mysqlnet/ - its an ADODB.Net compliant
library - very good quality ;)

- Mark

On Tue, 24 Aug 2004 22:01:03 -0700, JW <JW@discussions.microsoft.com>
wrote:
Ok, I hope this is something easy... but I have been staring at this for
way
too long.

I have the following query ( ODBC conn setup to MySQL ):

SELECT MonthName(dateOfOrder) as month, SUM(cost) as sales FROM
orderInfo,
imagesInOrder WHERE orderInfo.id=imagesInOrder.order_id Group By
Month(dateOfOrder)

which returns the following when I iterate over the OdbcDataReader:

June, 10.88
July, 22.96
August, 41.06

However, when I bind this query to a DataGrid, the DataGrid shows:

System.Byte[] $10.88
System.Byte[] $22.96
System.Byte[] $41.06

Any ideas? I don't understand why the correct string value ( i.e. the
month
name ) is fine when I iterate over the OdbcDataReader, but when I bind
it to
a grid it gets messed up?

Thanks much in advance,
Justin


--
Mark Harris
Head Developer
GameHost CP
Nov 18 '05 #2

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

Similar topics

2
by: Jerry Sievers | last post by:
Hello. Maybe I'm just out of practice, maybe not. Suppose we run a command using system() and this command writes to the stderr stream. If I remember correctly, this is normally written to the...
22
by: bq | last post by:
Hello, Two questions related to floating point support: What C compilers for the wintel (MS Windows + x86) platform are C99 compliant as far as <math.h> and <tgmath.h> are concerned? What...
0
by: Asaf | last post by:
Hi, When I am doing a POST to a SSL URL I am getting this error on first attempt "Cannot access a disposed object named "System.Net.TlsStream"." After the first attempt all works fine, here is the...
5
by: _BNC | last post by:
I've converted " byte" to "byte *" at times, using 'unsafe' and fixed { .... }, but the reverse does not seem to work. In this case, a C++ DLL returns a byte * and a length. What is the best...
0
by: bnlockwood | last post by:
G'day all, Thank you in advance for anyone that can help. I have a shopping cart datagrid on my c# asp.net page. This is the code: ------------------------------------- <asp:datagrid...
0
by: woollymammoth | last post by:
I can't assign a MS SQL Server table record value to a simple VB variable, should be an easy thing. Sample SQL Server table has the data in the record as a char(30) string, the column for that record...
2
by: =?Utf-8?B?cmVk?= | last post by:
Hi Friends, We recently deployed our application to production and I am experiencing the below error message. Cannot access a disposed object named "System.Net.TlsStream" The error occurs...
5
by: Chris Botha | last post by:
There is a database table with one of the columns named "System". When creating a new Dataset for this table, the project gives a huge number of compile errors. If I change the column name to be...
4
by: Chris Botha | last post by:
The customer has a database with a column in a table named "System". I've been using this method for years now - create a dataset (an .xsd file) for the table. With a column named "System" in 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.