Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

mySqlBytes.buffer is getting converted to BigEndian even t..

 
   Database Forums (Home) -> Clustering RSS
Next:  best practice for remotely connecting to Cluster ..  
Author Message
DR

External


Since: Oct 23, 2007
Posts: 27



(Msg. 1) Posted: Fri Jan 04, 2008 3:24 pm
Post subject: mySqlBytes.buffer is getting converted to BigEndian even though both SQL server 2005 and the CLR function are on the same machine which shows BitConverter.IsLittleEndian == true
Archived from groups: microsoft>public>sqlserver>clustering (more info?)

mySqlBytes.buffer is getting converted to BigEndian even though both SQL
server 2005 and the CLR function are on the same machine which shows
BitConverter.IsLittleEndian == true

in tsql: select * from dbo.MY_CLR_FUNCTION(cast(1024 as binary(4)))

public static int MY_CLR_FUNCTION(SqlBytes mySqlBytes)

in debugger binaryData.buffer now shows bigendian!!
[0] 0 byte
[1] 0 byte
[2] 4 byte
[3] 0 byte

the data stays littleendian if the integer is hard coded in C#:

int myint;
myint = 1024;
byte[] b = new byte[4];
b = BitConverter.GetBytes(myint);

in debugger binaryData.buffer shows littleendian
[0] 0 byte
[1] 4 byte
[2] 0 byte
[3] 0 byte


in all cases BitConverter.IsLittleEndian shows true, so why is the integer
hard coded in tsql getting converted to big endian when it arrives in a clr
function?

 >> Stay informed about: mySqlBytes.buffer is getting converted to BigEndian even t.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Enterprise Manger against remote cluster - Newbe question; how to connect to a remote cluster over VPN (Cisco) with Enterprise Manager (EM)? Client connectivity installed locally and failover cluster running remote with Cisco software VPN-client between. I successfully registered the server....

SQL Reporting Service on Cluster server - Hi, If I install SQL RS Enterprise on SQL Cluster , do I have to create IIS Cluster Resource for the "Reports" and "Report Server " web virtual directory ? Norman

SQL Cluster 5005 (0000138d) - I reinstalled second node after a hardware failure. I followed the instruction on "How to add nodes to an existing virtual server". When I try to move group the message "5005 (0000138d)" coming up.

Analysis Service - There was a hardware failure on node cluster. I reinstalled and know I need to install Analysis Service. How can I do it ?

Problem installing SP4 - Hi, when attempting to apply SP4 to a SQL cluster, we are getting the following message. Buffer Overrun detected! A buffer overrun has been detected which has corrupted the programs internal state. The program cannot safely continue execution and must....
   Database Forums (Home) -> Clustering All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]