You Win! cb:-D:-D:-D
betterc
Posts
-
Picking Up C# or How I typed my fingers to the bone -
Picking Up C# or How I typed my fingers to the boneWow, that's pretty good but it returns the path plust the executable .exe file. So I'll have to strip off the xxx.exe. BTW the above example I used (which I got off of MSDN) retuns the path prepended with "file:\". So there I have to strip the begining off. So one way or the other it will take 2 statments to get the path to the applicaiton. Again, I'm not complaining just stunned once in a while. cb :-D:-D
-
Picking Up C# or How I typed my fingers to the boneDon't anybody get me wrong, I am having a love afair with C#. I just finding my self kind of chuckling as I'm typing along. cb
-
Picking Up C# or How I typed my fingers to the boneAs I recall ... the time I had to use it was with the AppendText method. Since then, I don't even think about it and just type it out. Use MSDN all the time. :-D:-D:-D:-D:-D Thanks, cb
-
Picking Up C# or How I typed my fingers to the boneI'm an old guy. I've gone up the technical ranks to run a couple of significant software development groups; suffered the crash and now code for a living. I haven't coded in every programing language known, but then, I've got quite a few nothes on my pocket protector. I love C# but I don't think I've typed so much since the days of 'Big 8' COBOL. I get a chuckle on how much I have to type to get something so small done. I thought I'd seen everything when I found that a \n\r was replaced by an 'Environment.Linefeed'. But I really had to grin when I googled to find that to get my application path I needed to enter: string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); It works but I think I've only got another C# project before I'll need to replace my keyboard. I think we need a contest on what is the longest statement possible in c# to retrieve a smiple result. There are 8 dots between the = sign and the ; in the above snippet. :-D:-D:-D:-D
-
Setting the System CursorThanks, it works like a charm. cb
-
Setting the System CursorI know how to set the cursor while in a 'form' but I want to change the system cursor just before I launch a thread and then change it back to the Arrow when the threaded process completes. How do I change the system cursor in C#? cb
-
need sp_helpdb return valuesI entered the code as you suggested and it works returning a '0'. My questions is how do I 'get' the values such as the name/path of the db and log files? Thank you, c
-
need sp_helpdb return valuesI think his article is good for creating wrappers for stored procedures that have been created for a given db. But my question is specifically about sp_helpdb. How would you construct c# code to execute this sp and get it's returned value(s)???? cb
-
need sp_helpdb return valuesWhere?
-
need sp_helpdb return valuesI've learned how to connect, attach and detach my msde tables and databases. Now I need to be able to make a call to sp_helpdb and get the return values from a C# applicaiton. Can someone give me some help please? Thanks, cb
-
Suppress click at load???I create a group of radio buttons so the user can select the database they want. When the user clicks one of the buttons, the event issues a detatch and re-attach to the proper database. The problem I am having is that during the form load I read the registry to find the current selection and then set the radio buttons showing which one has been checked by issuing a xyz.Checked = true; This then forces a click event which causes the db to detach/reattach. I only want the db to detach/reattach when the radio button is cliked by the user not during load. I get the same stuff using the CheckedChanged event and setting a bool first time pass doesn't seem to do the trick either. Thanks, Craig
-
How to I change form1.TextThank you very much for your quick response. I got hung up on using a "Layout" method and a few minutes ago figured out I needed a 'PerformMethod' call. Arrrrrrrrrrrrrrrrgh! If I wanted to write that much code I'd do a novel. Yours is a more straight fowrard approach and thanks. BTW as a newbie ... you would'nt believe the Googling I did to try to resovle this apparently easy issue. Issue closed, thanks again. cb
-
How to I change form1.TextAll I want to do is change the form1.Text property when I click a button? Could someone provide me with a simple approach? Thank you, cb
-
sp_helpfile ExecuteThanks for all of your help. I just didn't know how I 'captured' the return values. There is only one parameter to pass, the db. cb
-
sp_helpfile ExecuteI ran the demo and got "An exception 'System.Data.SqlClient.SqlException' has occured in SPTestApp.exe". cb
-
sp_helpfile ExecuteI'd like to be able to run the stored procedure sp_helpfile from within my C# program against my MSDE db. Is this possible? I haven't a clue on how to set up a structure to hold the results of the command. Any help would be appreciated. cb
-
C# sp_attach_db executeThanks I figured it out (@"\bla\bla\bla");
-
C# sp_attach_db executeThanks Heath, I'm getting an "Unrecognized escape sequence" for the values for filename1 and filename2. Doesn't like the '\'. I tried putting the value in paren's but that didn't help either. cb
-
C# sp_attach_db executeI need to detach and then re-attach my MSDE db from within my C# application. Can someone give me a clue on how to do this? I have no problem doing it in Querey Analyzer but can't seem to make the transition into C3? Thanks, cb