|
Hi Stefan Troschütz
Thank you i found the error
object [,,] myArray;
myArray = new object [,,] { { {"@EngCode"},{SqlDbType.Int},{TxtCode.Text} } };
---------------------------------
I Have a stroed procedure that take 13 parameter
CREATE PROCEDURE dbo.CreateUser
(
@EngCode int,
@EngFName nvarchar(20),
@EngMName nvarchar(20),
@EngGName nvarchar(20),
@EngLName nvarchar(20),
@EngNotes nvarchar(500) ,
@EngineeerTypeID int,
@UserName nvarchar(10),
@EngMail nvarchar(50),
@EngCellNo int,
@EngHNo int,
@UserPassword nvarchar(12),
@UserNotes nvarchar(500)
)
I call this proc from my C# sO
SqlParameter POne = new SqlParameter();
POne.ParameterName = "@ParaName";
POne.Value = MyText.Text;
POne.SqlDbType = SqlDbType.NVarChar;
MyCommand.Parameters.Add ( Pone );
i will repeat this operation 13 time But
if i had a Multidimensional array
myArray = new object [,,] { { {"@EngCode"},{SqlDbType.Int},{TxtCode.Text} } };
and have a foreach to loop; it would be then a better idea
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|
You can write those five lines of code in a single line:
MyCommand.Parameters.Add(new SqlParameter("@ParaName", SqlDbType.NVarChar)).Value = MyText.Text;
Notice that the Add method returns a reference to the parameter, so that you can set the value property.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
Thank you very much
But we should put it that way
MyCommand.Parameters.Add(new SqlParameter("@ParaName", SqlDbType.NVarChar).Value = MyText.Text );
Thank You again
--------------------------
If you found my answer to your question useful; then vote for me.
------------------------
Ahmad Shaban
|
|
|
|
|
No, that doesn't work. The value of the operation or assigning the string to the Value property, is the string. The result is that you will be throwing the SqlParameter object away and adding the string to the parameter collection instead.
Use the method that I showed, or this even shorter one:
MyCommand.Parameters.Add("@ParaName", SqlDbType.NVarChar).Value = MyText.Text;
---
b { font-weight: normal; }
|
|
|
|
|
hi,
How can I import the data froma .csv file in SQl server database by DTS package in Dot Net C#.
Thank in advance
|
|
|
|
|
If i do that:
Image img_1 = new Bitmap(200, 200);
Image img_2;
img_2 = img_1;
now there are two different objects in the memory so if i do:
img_2 = null;
then
img_1 = 200x200 bitmap
or that is the same object so:
img_2 = null
then
img_1 = null too?
|
|
|
|
|
img_1 and img_2 are both refferenes to the object, and not the object itself.
If you do this:
Image img_1 = new Bitmap(200, 200);
Image img_2;
img_2 = img_1;
Then apply some manipulation to img_1, these changes will also reflect in img_2.
If you do this:
img_2 = null
Then it now points to nothing, but img_1 is still the value it once was (200x200 bmp).
And this:
img_2 = img_1
img_2 = new Bitmap(50,50)
img_1 will be the origional 200x200 bitmap, while img_2 will be the new 50x50 bitmap.
hope that helps
Tris
-- modified at 5:01 Tuesday 28th March, 2006
|
|
|
|
|
|
I've been experimenting with remoting, and have got it fairly well figured out.
I'd like to play with app domains now, but have a few questions -
1) Firstly, when creating a program we have a "MAIN" method that takes a number of string arguments. Am i right in assuming that these are the "/w" "/r" "/filename" etc tags that we can specify as command line parameters after the .exe name in a given shortcut?
2) When an app domain is created, it will run and behave exactly as one would expect an application to behave. It will be started on a new system thread, and run until a set of conditions cause it to exit. I.e If we create a new AppDomain that is a windows forms App, it will look and behave like a windows forms app.
3) If the above are both right, it should be possible to write an app that will, on creation, take a number of arguments, and connect to a remote object (In this case the Application that created the new AppDomain).
What i would need to do is forward the remoting host destails in the apps main method but i don't know how to set them when creating an app domain.
Can anyone help me with this?
Cheers
Tris
-- modified at 4:40 Tuesday 28th March, 2006
|
|
|
|
|
I am using Windows 2003 server, when W3wp.exe dialog box appears it stops the some services, after clicking on OK button it works fine. Can anyone knows how to create a service which close the w3wp.exe dialogbox automatically, or else(any other soloution).
Know Yourself Than Grow yourself.
|
|
|
|
|
A better solution would be to figure out whats causing the dialog to pop up in the first place and fixing that.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I close /kill an error message dialog appearing on the desktop automatically e.g. if a service crashes I want to close its error message.
Know Yourself Then Grow Yourself.
|
|
|
|
|
First, your putting alot of effort into putting a band-aid on the real problem.
What's causing the service to crash?? Fix the problem, instead of wasting the time building an automated way of ignoring it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear, Dear and Dear if i am using a product and i have no source code, then i want same kind of solution.
Know Yourself Then Grow Yourself.
|
|
|
|
|
Have you tried taking this up with the manufacturer of the service?
Maybe they have the solution...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to display Logged user list and when evere any user logged i want to know.
can any body help me out .
it's very urgent.
-- modified at 4:16 Tuesday 28th March, 2006
|
|
|
|
|
The information you want doesn't exist in Active Directory and isn't tracked by anything.
What you want can't be done!!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What is the better way without quality less?
|
|
|
|
|
What is it that you want to do with the image?
---
b { font-weight: normal; }
|
|
|
|
|
I need to load Jpeg, gif or png files and save it to BMP
|
|
|
|
|
Use Bitmap.FromFile to load the image, then use the Save method with ImageFormat.Bmp to save the image.
---
b { font-weight: normal; }
|
|
|
|
|
it is the better way? That is it is the less quality loser?
|
|
|
|
|
bmp is a lossless format, there's no loss converting from anything else to one unless you resize or change the color depth.
|
|
|
|
|
Hello!
Ok, so I've documented my C# code with XML comments. Now I want to generate some nice MSDN-style documentation out of it.
I've looked at NDoc already, but it doesn't seem to support .NET 2.0 (generics, ...) yet.
What tool could I use?
Thanks in advance and best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hi,
How do we pass an integer argument from C# into a javascript function?
I declare an integer variable first, then I pass it into the javascript function.
But the javascript code didnt execute correctly.
//First, an integer variable is declared
int numofItems;
// Returns the Javascript code to attach the context menu to a HTML element
public string GetMenuReference()
{
return String.Format("return __showContextMenu({0},numofItems);", Controls[0].ClientID);
}
//Then the Javascript is called when the oncontextmenu event happens
ctl1.Attributes["oncontextmenu"] = GetMenuReference();
Initially the javascript function has the {0} argument only and it worked fine. But when I added one more integer argument, it doesnt work. What is the correct way to pass an int argument ?
|
|
|
|