|
If you are trying to say/ask something, please type it. No one will dare download the document for security reasons
|
|
|
|
|
I wouldn't go as far as to say no one
|
|
|
|
|
Make sure you have the project set to create an XML documentation file (project properties, build tab, and check the "XML documentation file" checkbox).
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Check the "create XML documentation file" and provide a path for the docu file in the project settings.
Copy your dll and the docu xml together to your other project.
-^-^-^-^-^-^-^-
planetgeek.ch
|
|
|
|
|
Hello,
I have username and password va;ues with me. I want to check programmatically whether the username & password are correct to login to reporting services or not. Is there any way to check it from c#?
Thanks,
Ajit
|
|
|
|
|
|
i'm trying to pass values to db through a query.this ia the update query.
" UPDATE T_PRECORD
set PR_FIELD10= @singhalaname ,PR_FIELD8 =@singhaladesignation
where PR_FIELD21 = @regno";
i used
command.Parameters.Add("PR_FIELD10", SqlDbType.VarChar);
command.Parameters.Add("PR_FIELD8", SqlDbType.VarChar);
command.Parameters.Add("PR_FIELD21", SqlDbType.VarChar);
command.Parameters["PR_FIELD10"].Value = cadbn.Name_singhala;
command.Parameters["PR_FIELD8"].Value = cadbn.Desig_sinhala;
command.Parameters["PR_FIELD21"].Value = cadbn.Regno;
but when i execute this i get the exception saying that to declare the
@singhalaname,@singhaladesignation, @regno
can anyone tell me how to pass vales as parameters to sql 2000 DB
|
|
|
|
|
when you add params you need to type the param name not the fieldname
that maybe the problem
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
|
|
|
|
|
How about this ?
command.Parameters.Add("@singhalaname", SqlDbType.VarChar);<br />
command.Parameters.Add("@singhaladesignation", SqlDbType.VarChar);<br />
command.Parameters.Add("@regno", SqlDbType.VarChar);<br />
ommand.Parameters["@singhalaname"].Value = cadbn.Name_singhala;<br />
command.Parameters["@singhaladesignation"].Value = cadbn.Desig_sinhala;<br />
command.Parameters["@regno"].Value = cadbn.Regno;
|
|
|
|
|
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
|
|
|
|