|
Got my 5, only to level out. I don't see why you got down voted for asking a question ( even one with a little attitude... )
Not that I expect you care too much about post voting
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
*All* of my questions ahve a little attitude.
I don't care about post voting, but article voting based on politics just pissees me off.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Little attitude?
Posting about .Net crap in a C# forum is a clear "Vote me down!" invitation.
Robert
|
|
|
|
|
i inset in datetime filed , the value from datetimepiker
i customed format it as dd/MM/yyyy
but in the insert statment it takes the value as MM/dd/yyyy
how can i handel the format in sql statment
thanks for help
MD_NADA
|
|
|
|
|
well, you can build a custom formatted string, if that's your only option.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Parse the string so that you get a DateTime value that you can put in a database parameter. If you use the string in the SQL query, the database will parse it according to the date format it's using.
---
b { font-weight: normal; }
|
|
|
|
|
Hi there.
I'm getting a headache finding a regular expression to determine if the char that I've just read in is a word char (\w) or a valid form of punctuation (not sure how to best describe this in regex terms).
Essentailly I'm in a loop reading char by char and wanting to go do "something else" at the end of each word - unless the word is follwed by a semicolon or a comma or so-on. In this case I want to loop agin to include the punctuation char in the word and then go off and do the "something else".
I have the "word char" bit so far:
Regex reg = new Regex("\\w", RegexOptions.IgnoreCase|RegexOptions.Compiled);
But I need to add the "or a punctuation char" bit to this. I tried to using a number constructs to add the but nothing is working out!
Any help is greatly appreciated.
Kind regards,
John.
_______
Your system must be restarted for these changes to take effect.
This is not a drill.
|
|
|
|
|
Use the OR operator (|) in your regular expression:
\w|\.| ;|\?
If you haven't already, you may want to get a copy of Regex Coach. It's a free utility for designing and testing regular expressions.
|
|
|
|
|
Jim,
That worked a treat - many thanks.
I wasn't sure about the syntax - most of the web pages I saw have very complex examples or only code for one specifi thing - not a combination of several.
Once again, thanks for your response.
John.
PS: The smiley in the middle of the expression was interesting!
|
|
|
|
|
Most examples are more complex because they use regular expression to match the entire strings, not just to identify single characters. You should consider using the regular expression for what you are doing, instead of looping through the characters.
---
b { font-weight: normal; }
|
|
|
|
|
Im trying to code an email message. From what ive found is that im supposed to use system.web.mail however when i try to use it, it tells me that the namespace doesnt exist, can anyone help me out?
|
|
|
|
|
I suspect you're writing a windows app ( not ASP.NET ) and need to add a reference to System.Web to your project.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Numbers1thru9,
Christian has given you the one of the reasons why you face the error in the first place.
In the event you want to have a look at some simple code; I had published an aritcle titled "AlarmTimer" located at http://www.codeproject.com/csharp/abyalarmtimer.asp[^] Just some basic stuff when I intiialy started fooling around.
Hope it helps you out...
Thanks and Regards,
Aby
|
|
|
|
|
Ok this might sound like a very dumb questions to many ppl but I have got to understand it so ignore the dumbness of the question .
Anyways, in windows applications (for e.g. Quicken, QuickBooks, MS Money or any other data-extensive application) how and where do they store the data? Do they use a database? if they use a database then why don't they ask us to install a database engine (which should be a prerquisite - MSDE for instance)?
If they don't use database then how in the heck do they keep up with the relational data?
Your help will be appreciated . Thanks in advance.
|
|
|
|
|
I don't know how they store their data, but I guess it's some custom binary format.
But for your own applications you might want to use SQLite.
It's a database similar to MySQL (though lacking some feaetures) which stores a database into a single file
For C# (and .NET) you can use the Mono.Data.SQLite class in your applications
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How can i play a simple wav file with my application?
rzvme
|
|
|
|
|
Not sure if there's anything built in ( for C# 2.0, I thought there was ), but the PlaySound API can be interoped for wavs, for mp3, you can use the Windows Media Player control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i know there is a playsound function and i read on msdn that it is on coredll.dll. the only problem is that i don'y have a coredll.dll.
rzvme
|
|
|
|
|
|
You are looking for one of these functions
[DllImport("Winmm.dll", CallingConvention=CallingConvention.Cdecl)]
static extern int sndPlaySound(IntPtr buffer, int dwFlags);
[DllImport("Winmm.dll", CharSet=CharSet.Ansi,
CallingConvention=CallingConvention.Cdecl)]
static extern int PlaySound(string filespec, int hModule, int dwFlags);
Luc Pattyn
|
|
|
|
|
|
I have bound a DataTable to a DataGrid:
_ds = new System.Data.DataSet("ResultsDataSet");
_resultsTable = new System.Data.DataTable( "ResultsTable" );
_ds.Tables.Add( _resultsTable );
dataGridResults.SetDataBinding(_ds,"ResultsTable");
When the user clicks on a row, I want to get information about that row:
System.Data.DataRow currRow = _resultsTable.Rows[dataGridResults.CurrentRowIndex];
This works fine until I sort the DataGrid by clicking on the column headers. Now the dataGridResults.CurrentRowIndex is out of sync with the _resultsTable. I either need to have the DataTable sort with the DataGrid, or be able to get information directly from the DataGrid. Am I doing something wrong, or do I need to add something?
|
|
|
|
|
Hi,
try this:
System.Data.DataRow currRow = _resultsTable.DefaultView[dataGridResults.CurrentRowIndex].Row;
Robert
|
|
|
|
|
That helped. I had to tinker with it a bit more, but it is working now.
Thanks
|
|
|
|
|
Hi everyone,
Here's what I'm trying to do. I create a RichTextBox object and set some text (in code, I'm not adding it to the form). I want to take what it would look like and draw it onto another control (like a panel).
Am I able to do this somehow? Is it possible without Interop junk?
Thanks,
Nick Spacek
|
|
|
|