|
Please don't cross post. It's rude
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi friends I want to create a oracle Stored Procedure that stores data in table Employee_Info which is in a dataBase that is named Garmrnts. But I d not know how to create a stored procedure that stores data. Oh! I want to access those procedure using C# & Oracleconnection. Can any one tell me how can I do that? Plz It will really help me a lot.
|
|
|
|
|
You may want to look around on Oracle's site or ask this in the SQL forum.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
|
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I created a setup for my small application using the click once deployment method.But I also want to execute another *.exe file in setup. i.e. I want to execute another *.exe file after the setup has been completed.
Do you guys know how to do it?
|
|
|
|
|
Don't cross post the same question in multiple forums. It make's collaboration on an answer just about impossible.
|
|
|
|
|
|
You shouldn't cross post messages. It's considered rude - see forum guideline no.1.
Choose the most appropriate forum for your question and post there only. As this is an ASP.NET question, the ASP.NET forum is more appropriate.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi!
I created a new Windows Service in C# and want to set a Service Dependency.
Did it like this:
ServiceInstaller si = new ServiceInstaller();<br />
si.ServicesDependedOn = new string[] { "DependingOnThisService" };<br />
this.Installers.Add(si);<br />
Everything works fine. My Problem right now is, that I want to set this Dependency only in fact of a special "flag" in the app.config - file.
But I am not able to read from the app.config - file in the ( from System.Configuration.Install.Installer inherited) class.
I neither get an exception nor a result from the config - file (always get an empty string).
So is there a possibility to read from the app.config in this class or, if not, what is the best alternative to do this?
Hope anybody can help me!
tia
|
|
|
|
|
How can I get yes/no/cancel option from javascript.
I know a option "Confirm" but this code has two option (OK/Cancel)
|
|
|
|
|
A C# forum isn't really the best place to ask (!) but here you go[^].
|
|
|
|
|
|
I am using VS 2003 with 1.1 of the framework. (No hope of getting an upgrade )
Scenario
I am using a textbox which allows a user to input text in order to filter a list. I am using the KeyPress event for the control to save the user from having to click a separate button.
Problem
The event doesn't fire sometimes. The odd time another control (e.g. a button ) gains focus and fires it's Click event.
I have tried searching this site as well as Google to no avail.
Has anyone encountered this type of problem?
|
|
|
|
|
Other controls should only get activated if they have some kind of shortcut via alt or if they are the accept/cancel buttons (enter / esc). It might be worth checking the keypreview property of your form is set to false.
|
|
|
|
|
You might want to make sure the Form's KeyPreview Property is set to true. Getting the property information from the object browser for the property:
<quote>Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi All,
I'm fairly new to C# so somewhat clueless. I'm writing an error handler class library which will receive exceptions thrown and can be configured to display and/or log the exception.
In order to display, I'm trying to use the MessageBox class so I've included a reference to System.Windows.Forms. I also added a using statement for System.Windows.Forms. When I compile, I get an error "The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)". I'm guessing that the problem has something to do with the fact that I'm working with a class library and perhaps .NET uses a different System class for class libraries. I've tried this with VS 2005 and SharpDeveloper and both give exactly the same error.
Is there a genius out there with a solution?
Thanks,
Steve
|
|
|
|
|
Hi,
to use the many classes .NET provides, you typically need to do two things:
1. add a reference, using the Solution Pane, right click on the project, choose Add Reference,
and select (in your case: System.Windows.Forms);
2. add a using statement (using System.Windows.Forms). You will notice Intellisense works
for you while you type this provided you finished step 1 first.
Some of these may happen automatically, depending on the project type you selected,
but none so for a class library.
modified on Friday, January 11, 2008 12:28:45 PM
|
|
|
|
|
Please read my original message. You'll see that I did add a reference and a using statement.
|
|
|
|
|
I think I told you everything there is to do to get it right.
Does Intellisense show Windows when you have entered "using System."?
Does Intellisense show Forms when you have entered "using System.Windows."?
Can you show some code, up to the line that causes the error?
general suggestion: tell the Visual editor to always show line numbers (see menu
Tools/Options/Text Editor/...), then debug using the line numbers the compile- or
run-time messages provide.
|
|
|
|
|
You were correct. It was my own stupid mistake (as usual). I had 2 classes in my solution; the main class and an nunit test class. I thought the error was being thrown by the main class which contained the reference, but it was actually being thrown by the test class which did not have the reference.
Thanks for you help,
Steve
|
|
|
|
|
hi
i have a method as 'GetDbUsers' and i use it like this :
this.dt = this.GetDbUsers();
body of my method is :
private DataTable GetDbUsers()<br />
{<br />
string spName = "sp_helplogins";<br />
SqlConnection con = new SqlConnection(GlobalUtil.GetConnectionString());<br />
SqlCommand cmd = new SqlCommand(spName, con);<br />
SqlDataReader dr;<br />
DataTable dtDbUsers = new DataTable();<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
try<br />
{<br />
if (con.State == ConnectionState.Closed)<br />
con.Open();<br />
dr = cmd.ExecuteReader();<br />
dtDbUsers.Load(dr);<br />
foreach (DataRow row in dtDbUsers.Rows)<br />
{<br />
if (row["LoginName"].ToString() == "##MS_AgentSigningCertificate##")<br />
dtDbUsers.Rows.Remove(row); <br />
}<br />
return dtDbUsers;<br />
}<br />
catch (Exception ex)<br />
{<br />
if (con.State == ConnectionState.Open)<br />
con.Close();<br />
this.toolStripStatusLabel1.Text = ex.Message;<br />
MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
return null;<br />
}<br />
finally<br />
{<br />
if (con.State == ConnectionState.Open)<br />
con.Close();<br />
}
my problem is that when i modify the local dataTable object (dtDbUsers) in above method (remove some row), the following error has shown me :
Collection was modified; enumeration operation might not execute.
where does my problem and how to solve it ?
thanks
|
|
|
|
|
hdv212 wrote: foreach (DataRow row in dtDbUsers.Rows)
{
if (row["LoginName"].ToString() == "##MS_AgentSigningCertificate##")
dtDbUsers.Rows.Remove(row); // error in this line
}
This means that you cannot add or remove items from the collection while you're enumerating it. foreach creates an Enumerator over the collection automatically.
You can use a normal for statement and index through the collection to do this. I would highly recommend that you start at the end of the collection and work your way to index 0. This will prevent you from deleting an item and skipping the next item in the collection. This is because when you remove an item at one index, say number 5, the items in indexs 6 through whatever all move down one. So item 6 is now at item 5. When your get to the bottom of the loop and the index variable incerements, you're no longer looking at item 5, but instead you're looking at the new item 6. The new item 5 gets skipped over.
|
|
|
|
|
Hi Dave Kreskowiak
thanks for reply
my problem solved.
Many thanks.
|
|
|
|
|
hi All,
Suppose GC consists of a number of forests. with ldap search, i found a record in the GC and now want to update this record, but attribute which i want to update is not presented in GC.
how to identify forest this record belongs to and what ldap port i must use to update this record in the forest?
modified on Friday, January 11, 2008 10:46:33 AM
|
|
|
|