|
Hi every one ,
I'm programming with C# and I wrote below code :
command = new System.Data.Odbc.OdbcCommand();
command.CommandType = System.Data.CommandType.Text;
commString = "INSERT INTO MyTable (MySign) VALUES (@MySign)";
command.CommandText = commString;
command.Connection = SqlConn; //is defined
command.Parameters.Add("@MySign", OdbcType.VarBinary).Value = MySign;
SqlConn.Open();
command.ExecuteNonQuery();
SqlConn.close()
but I get <must declare="" the="" scalar="" variable="" "@mysign"=""> error,what is my mistake?
Please help me.
yours sincerely.
Orchid
|
|
|
|
|
ODBC doesn't support named parameters.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Guffa
Thanks alot for your reply,
But do you know how can I insert the variable (Byte[]) in the sql server?
I 'd like to connect to DB with odbc and I want to insert it a byte array variable,what is the solution?
yours sincerely.
Orchid
|
|
|
|
|
Use unnamed parameters.
---
b { font-weight: normal; }
|
|
|
|
|
Dear Guffa,
Thanks a lot for your guide,
My problem is solved .
Best Regards.
Orchid
|
|
|
|
|
Dear Guffa,
Thanks a lot for your guide,
My problem is solved .
Best Regards.
Orchid
|
|
|
|
|
HI
yes this is byt array
But i have to read 4 consecutive byte in a uint variable so that i can use it as a offset.How can i do this
Parshant
|
|
|
|
|
Do not repost your question.
You should have replied to my post in the previous thread!!
Are the values of your bytes stored in decimal or hexadecimal?
|
|
|
|
|
|
If your values or store in hex Right to left order Like this:
Byte3-byte2-byte1-Byte0, and each byte represents a hex value from 1-15
So your read byte0,
Then byte1 and multiply it by 16
Then byte2 and multiply it by 256
Then byte3 and multiply it by 4096
It's a simple Hex-dec conversion, and I hope I got you right..
Regards
|
|
|
|
|
Hi
My byte array store hex values
take an e.g
00 ea d4 00 This is four byte .how can i read then in as it is in a variable so that myvariable=d4ea
in vc++ there is memcpy function there should be?
|
|
|
|
|
I believe that you have not stored hexadecimal digits (0-15) in the bytes in the array, but byte values (0-255)? Am I correct?
Shift the values and add them together:
uint b1 = theByteArray[somewhere];<br />
uint b2 = theByteArray[somewhere + 1] << 8;<br />
uint b3 = theByteArray[somewhere + 2] << 16;<br />
uint b4 = theByteArray[somewhere + 3] << 24;<br />
<br />
uint offset = b1 + b2 + b3 + b4;
---
b { font-weight: normal; }
|
|
|
|
|
Hi
My byte array store hex values
take an e.g
00 ea d4 00 This is four byte .how can i read then in as it is in a variable so that myvariable=ead4
|
|
|
|
|
Your statement is contradictory. Are you storing a hexadecimal string in the byte array, or are you storing bytes like 00 ea d4 00?
If you are storing bytes, do you want a value like 00ead400 or just the middle bytes ead4?
Are you storing the bytes in reverse order, i.e. Motorola style, or are you storing them in regular Intel order?
---
b { font-weight: normal; }
|
|
|
|
|
Hi
How can i read a 4byt offset from a byt buffer in c#
Parshant
|
|
|
|
|
Hello
how do you store your bytes buffer??
If it's a bytes array:
byte Offset = MyBuffer[3];
Regards
|
|
|
|
|
Hi,
I am working on a Windows based project using C#.
Using VS 1.0 version.
I am using a datagrid.I have a problem, that if the user
modifies the data in the grid, how will we come to know
that there is a change in value in the grid.
Plz help me to solve the prob,since i am new to C#
Thanks in advance
Regards,
Vaishali
|
|
|
|
|
Hello
1- Are you using Datagrid or DatagridView?
2- Is your DataGrid Databound to a source or do you poplate it manually?
Regards
|
|
|
|
|
Hi,
1- I am using Datagrid
2- And my DataGrid Databound to a source in database(Mysql).
ie.I have a dropdown box to select say for eg. to select city.
where city list will come from database
Thanks ..
Waitin for the reply
Regards,
Vaishali
|
|
|
|
|
If you use a Dataset in your binding, try to check the value of DataSet.HasChanges property.
Regards
|
|
|
|
|
i want to make method invocation will will help my customer to take arry of Object
how can make this ??
Palestine
|
|
|
|
|
Hello
Please delete your previous post and keep only this one.
To know more about creating/using WebServices, Click here[^].
Regards
|
|
|
|
|
i want to make web service that will return Object
* how can make this web service ????
Palestine
|
|
|
|
|
Hi man
visit the following website
WEBSERVICES[^]
hi to all palestinien ones ... yes palestine not others ...
Thanks alot
Hamody
|
|
|
|
|
I built application in .net remoting,any one can know how i can build a clustering server ,this mean if my server fail call another server to complete the process.
|
|
|
|