On 6/23/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
I'm sorry but this is exactly where it started.
with the single-byte value being '\xA0'
byte.Parse(inputstring)
emits an error saying incorrect input format.
If you read the documentation of FW: Converts the string
representation of a
First convert the char(1) in your charset into unicode (cause
everything in FW work with unicode), then use simple conversion:
char c = 'a';
byte b = (byte)c;
You can do
char c = 'a'
because 'a' is a Char.
You can't do
char c = (byte)'\xA0'; // a byte with the value of hexadecimal A0, not
On 6/23/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
First convert the char(1) in your charset into unicode (cause
everything in FW work with unicode), then use simple conversion:
char c = 'a';
byte b = (byte)c;
You can do
char c = 'a'
because 'a' is a Char.
You can't do
char c =
On 6/23/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
FW means Framework.
There are many framework, but here, you seem to mean .NET framework.
OK, wer're in net-provider list. I suppose, that's obvious, that I'm
talking about .NET FW.
I'm sorry, but it is. Every piece of code in FW is
0xA0 ISN'T valid char because EVERYTHING in FW is unicode. You have to
convert your value to unicode first fo be able to cast it to byte.
Well, so I have been asking how. Let me put it this way. I have a byte in
the database (FB2.0). and we have a Byte type in .NET world. I would like
to use
On 6/23/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
Thank you for your help. I'm still wondering why .net provider does not
support direct byte read in FbDataAdapter's Fill method, though.
It does, cause' it follows abstract ADO.NET classes. If there's a
source with byte, you get it with byte.
FW means Framework.
There are many framework, but here, you seem to mean .NET framework.
I'm sorry, but it is. Every piece of code in FW is written to work
primarily with unicode. The way, that you can use any other character
set is the feature.
As for string or text, yes, but that is not
Hello:
So are you saying I should store this single byte as BLOB in FB2.0 database?
Use a smallint field.
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
BTW in FB default UDF pack is ascii_char and ascii_val function. Why
not to use it for getting values from DB.
Note.: Depends on your needs and performance issues.
Finally, you tell me how, and I thank you profundly. ascii_val sounds
promising.
I have been using my own UDF and didn't look
On 6/23/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
Well, so I have been asking how. Let me put it this way. I have a byte in
Use the Encoding class (namespace System.Text).
the database (FB2.0). and we have a Byte type in .NET world. I would like
to use the byte information in .NET as a
BTW in FB default UDF pack is ascii_char and ascii_val function. Why
not to use it for getting values from DB.
Note.: Depends on your needs and performance issues.
--
Jiri {x2} Cincura
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com
On 6/21/07, Nobuya Higuchi [EMAIL PROTECTED] wrote:
What's your connection string charset?
--
Jiri {x2} Cincura
CharSet=NONE
Try to add column as object not as byte. Probably there's some
casting. The look what's inside object (it'll be probably char). When
you will know this, do
? Nobuya Higuchi [EMAIL PROTECTED] ?? ??? ??
news:[EMAIL PROTECTED]
Hi,
I'm trying to read a single-byte in FB2.0 database as char(1) field with
...
DataTable dt = new DataTable();
dt.Columns.Add(dtd, typeof (byte)); // dtd is the name of the
database
field
Try this
DataTable dt = new DataTable();
dt.Columns.Add(dtd, System.Type.GetType(System.Byte)); // dtd is
the
name of the database field
K.
Result:
It produces the same error as in case of
dt.Columns.Add(dtd, typeof(byte));
System.ArgumentException : (the byte content) not able to
Try to add column as object not as byte. Probably there's some
casting. The look what's inside object (it'll be probably char). When
you will know this, do casting to byte just before filling datatable.
--
Jiri {x2} Cincura
I don't understand whay you are saying. How can I cast the added
? Nobuya Higuchi [EMAIL PROTECTED] ?? ??? ??
news:[EMAIL PROTECTED]
Try this
DataTable dt = new DataTable();
dt.Columns.Add(dtd, System.Type.GetType(System.Byte)); // dtd is
the
name of the database field
K.
Result:
It produces the same error as in case of
DataTable dt = new DataTable();
dt.Columns.Add(dtd); // dtd is the name of the database field
then read the value into string and convert with
byte val=byte.Parse(inputstring);
I'm sorry but this is exactly where it started.
with the single-byte value being '\xA0'
byte.Parse(inputstring)
Hi,
I'm trying to read a single-byte in FB2.0 database as char(1) field with
charset/NONE. I am using the byte as binary information ranging 0-255, not
as a letter in text. With FbDataAdapter's Fill method, the data is
translated into a string in a DataTable. It seems that when the value of
What's your connection string charset?
--
Jiri {x2} Cincura
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express
What's your connection string charset?
--
Jiri {x2} Cincura
CharSet=NONE
Regards,
Nobuya
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of
20 matches
Mail list logo