|
thanks , but i still getting the same exception? any other idea?
|
|
|
|
|
How are you executing the query ? Can you paste the code/error for better understanding ?
Make sure,
column names PR_FIELD10,PR_FIELD8,PR_FIELD21 do exists in the table and there is no typo
All your datatypes are varchar ?
Try doing it with this string,
string updateQuery = <br />
" UPDATE T_PRECORD <br />
set PR_FIELD10= '" + cadbn.Name_singhala + "' ,PR_FIELD8 = '" + cadbn.Desig_sinhala + "' where PR_FIELD21 = '" cadbn.Regno "'";
Edit - Also, make sure you are updating the right columns
|
|
|
|
|
sorry i couldn't answer you, but the way you suggest is the way this was done previously, the problem is for these fields i used other language(sinhalese)so when that values are put into the bean they are stored in english characters, so there is a high possibility for sql exception or injections (ex:set PR_FIELD10= 'hahal'kf' because of the ' in middle the query fails)
|
|
|
|
|
command.Parameters.Add("@singhalaname", SqlDbType.VarChar).Value = cadbn.Name_singhala;
command.Parameters.Add("@singhaladesignation", SqlDbType.VarChar).Value = cadbn.Desig_sinhala;
command.Parameters.Add("@regno", SqlDbType.VarChar).Value = cadbn.Regno;
P.S. Have you assigned the query to the command?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
i tried this way too.but failed.
please tell me if passing parameters for sql 2000 and 2005 are same or different.
because these are used for sql 2005 too
|
|
|
|
|
well if the exact same code works forr 2005 then there must be a version issue
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/aa226067(SQL.80).aspx[^]
hope that helps...
I assume you will have to add parameters in the correct order now i.e.
Command.parameters.Add(value);
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Does exist in C# a way to open a port ( LPT, COM ) like C++ fopen method?.
f = fOpen( "LPT1", "w")
I tried with... TextWriter tw = new StreamWriter("myFile.txt") but if I change myFile.txt with LPT1 I have this error, "filestream can't open win32 devices, like partitions or tape uniteds" why? thank you very much
|
|
|
|
|
|
|
Hello,
i would declare a list using C#, i do this :
List<orderdata> _orderDataList;</orderdata>
But there are an error : Error 1 The type or namespace name 'OrderData' could not be found (are you missing a using directive or an assembly reference?) C:\Form1.cs 27 14 WindowsApplication2
Thank you verry mutch.
|
|
|
|
|
post come more of your code, esp the part that uses OrderData
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
I am sorry,
the code is :
List <orderdata> _orderDataList;</orderdata>
Thank you verry mutch
|
|
|
|
|
yeah you posted that already...
What i mean is the error is saying you are using a type (OrderData) that cannot be found.
I assume it is compiler error?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
there are this error : Error 1 The type or namespace name 'OrderData' could not be found (are you missing a using directive or an assembly reference?) C:\Program.cs 16 14 ConsoleApplication1
Thank you verry mutch.
|
|
|
|
|
I know, and it means somewhere in your code is the text 'OrderData' and it is being used as a type which is not found
Are you using VisualStudio or something where you can click the error and it shows the related code, if not find the code.
Then post that line of code with a couple of lines of code either side of it so i can see what the issue is.
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Is it System.Collections.Generic.List or System.Web.UI.MobileControls.List?
If it is former then this is not the way to delcare a List. But in case, you need to check for the namespace mentioned in Form1.cs.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
I'm guessing that your post actually says List<OrderData> _orderDataList;. The < and > symbols get treated as HTML tags if you don't convert them.
Anyhoo - your problem here is that the class that contains this List is in a different namespace to the OrderData class (assuming it's in the same project - you may need to add the OrderData dll if it's in a different assembly). If you put your cursor on the OrderData text you will see a little red rectangle appear under the text - press Shift+Alt+F10 to drop down a menu containing the options on how to fix this - the first one will normally add a using statement to your file to fix this problem.
If the rectangle doesn't appear, you'll manually have to enter it - either by putting using ... at the top, or prepending OrderData with the namespace.
|
|
|
|
|
See Pete's answer, didn't see it before I posted.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
I have a c# class(ab.cs) included in a webservice application.How can I create a class instance inside the webservice(service.cs) class???????
|
|
|
|
|
You use the new keyword to create an instance of a class.
However, that seems to be a too simple answer, so perhaps your problem isn't exactly what you asked for?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
we are unable to create a new instance because we are calling a normal class into a webservice class.....
|
|
|
|
|
No, that is not correct. If you are unable to create an instance, it's not because it's a "normal" class.
Do you get any error message?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Its ok ..The problem is solved
we need to add the classes under App_code...
anyway thnks 4 ur reply....
|
|
|
|
|
Hi All
I am working with datagridview and i have added one column of type
DatagridviewcomboBoxColumn. I have also added some items in it. Till now it is ok but when i run the application and select one of the item from comboBox, it automaticaly adding another combobox below it (I.e. in the next row) but i dont want to add it. i have tried a lot but dont fint any solution how to avoid it. Can anyone tell me how to avoid it.
Thanx in advance.
Nitin
|
|
|
|