|
Spunky Coder wrote: when it is a nullable array object it's throwing exception
What kind of exception? Can you post whole exception message and stack trace?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi...
It's throwing - [System.ArgumentException] {"Value was invalid."}
StackTrace:
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
The type fullname is shown as
System.Nullable`1[[System.SByte, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]][]<br />
Koushik
|
|
|
|
|
str.Replace(RegularExpression,str) method.
The replace method of string cant be used with a regular expression,and string cant be inherited.
so you can use Regex object to do this job
//
<code>string strSource = "william<william@hotmail.com>", strResult;
MatchCollection mc = Regex.Matches(strSource, @"\w+?@\w+?\.(com|net)");
strResult = mc[0].ToString();</code>
//strResult = william@hotmail.com
Hope this help!
|
|
|
|
|
william.zheng wrote: (com|net)
There are a great deal more TLD's than .net and .com
|
|
|
|
|
People only count if they have a com or net domain.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi, i suppose it's common question and one has been asked many times, but all answers whats i find
no convinet for me. Since what i wan't to ask you guys whats the best convinet way to validate current object in databinding before move to another(and if one not valid prohibit to move). There is exists CurrentChanged event and not CurrentChanging, how i can emulate CurrentChanging in my code. I use dataBindingNavigator for move throught records, and sets of control that linked to my DataBinding object (not datagrid so i can't use rowvalidating and cellvalidating events).
Thanks.
|
|
|
|
|
HI : The Given Code is to store the specifications of the controls which are added to a form database is access ,here global is a class , lsave,i are variables
there is no syntax error at runtime a error is coming i.e Syntax error in insert into statement i have checked many times the database format and the format of the values both are same still the error is comming i will be thankful for ur suggestions as i am struck at this point.
OleDbConnection connection = new OleDbConnection();
connection.ConnectionString = WindowsApplication1.Properties.Settings.Default.printsoftwareConnectionString;
connection.Open();
//loop for saving the positions of the labels
OleDbDataAdapter oda = new OleDbDataAdapter("select * from controlspecifications",connection);
OleDbCommandBuilder cmb1 = new OleDbCommandBuilder(oda);
DataSet ds1 = new DataSet("controlspecifications");
oda.Fill(ds1, "controlspecifications");
DataRow dr = ds1.Tables["controlspecifications"].NewRow();
for (lsave = 0; lsave <= i; lsave++)
{
dr[0] = global.projectname + "adsfsd";
dr[1] = lab[lsave].Name;
dr[2] = Convert.ToInt32(lab[lsave].Left);
dr[3] = Convert.ToInt32(lab[lsave].Top);
dr[4] = Convert.ToInt32(lab[lsave].Width);
dr[5] = Convert.ToInt32(lab[lsave].Height);
dr[6] = lab[lsave].Text;
dr[7] = lab[lsave].Font.FontFamily;
dr[8] = Convert.ToInt32(lab[lsave].Font.Size);
dr[9] = lab[lsave].ForeColor.ToString();
dr[10] = lab[lsave].BackColor.ToString();
if (lab[lsave].Font.Bold == true)
{
dr[11] = "bold";
}
else if (lab[lsave].Font.Italic == true)
{
dr[11] = "italic";
}
else if (lab[lsave].Font.Underline == true)
{
dr[11] = "underline";
}
else
{
dr[11] = "strikeout";
}
dr[12] = "dasfsad";
ds1.Tables["controlspecifications"].Rows.Add(dr);
oda.Update(ds1, "controlspecifications");
oda.Fill(ds1, "controlspecifications");
sindhu tiwari
|
|
|
|
|
Please don't post your questions in multiple forums. It's considered rude. Choose the most appropriate forum (in this case probably the SQL forum) and post there only.
Paul Marfleet
|
|
|
|
|
|
hi all! i have a string like:
str="samir < samir@hotmail.com >"
now i want to a regular expression to get the value samir@hotmail.com using
str.Replace(RegularExpression,str) method.
can any help me.
Thanks & Regards,
SAMir Nigam
|
|
|
|
|
Here you have regex that matches email adress [A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
|
|
|
|
|
Nigam SAMir wrote: now i want to a regular expression to get the value samir@hotmail.com using
str.Replace(RegularExpression,str) method.
You can't do that.
Use the Regex.Replace method.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hello every body
I need to copy data from my dataset to an sql 2000 table with keeping the values of the identity column, so that the values of the identy column of the dataset will be coppied as it is to the Sql table that has an identity(1000,1)
I'm using C# .net 2005
please I need a help soon...
|
|
|
|
|
Use the commands set identity_insert mytable off and set identity_insert mytable on to disable and enable an identity constraint respectively.
Paul Marfleet
|
|
|
|
|
thx for u reply
but I'm using this in a command in my C# code before and after I use the datadapter.update (myDasate) but it still not working ant the ID in the sql table are generated automaticly according to the increment seed of the table
|
|
|
|
|
Use the SET IDENTITY_INSERT mytable ON statement to insert explicit values into an IDENTITY column on a particular table.
Paul Marfleet
|
|
|
|
|
Ok I got a counter going for my tabs. I have it so when ever the user creates a new tab it will count the pages in a integer. Then that number will get placed in the name at the end of the of that rich text's name. So how can I retrieve the name of the rich text box when the user clicks on the it? Then will be placed in a string, so it can be reused when a user clicks a another rich text box.
private void OnClickOfRTB(object sender, EventArgs e)
{
string WorkingOn = newRtb[_pageNumber].Name;
}
private void Paste(object sender, EventArgs e)
{
newRtb.WorkingOn.ToString.Paste();
}
So all I am asking is how can I combine a winform name into a hole string so it can be used in things like paste then convert it the string like if it was a form object.
I know this mite not be the best way to handle it, but that is all I can think of.
So if you can please help or if you need to understand my question more please ask me. My Mind keeps going back and forth on this question on how this should work.
Thanks Aj.
-- modified at 3:19 Tuesday 23rd October, 2007
|
|
|
|
|
How can i check the compressed drive or folder programmitically
naveen
|
|
|
|
|
You have asked the very same question here yesterday permalink[^] and you have got the answer there too so don't double post
|
|
|
|
|
First you are posting same queries again, following is the link of your post made yesterday, which was replied by Guffa-
Previous Post[^]
Second-
You posted your issue and when one user asked you to clarify the point, you made another post, you should have replied on the same post, this is your First Post[^] which you made today about the same issue.
I can not understand why are you doing this.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
I am going to making a control to chart the data from sensor,which run in wince.net.But I don’t know how to began ,so help me
JACOBI
|
|
|
|
|
|
code to check the compressed drive
naveen
|
|
|
|
|
tnaveen wrote: code to check the compressed drive
What about the code? Be more specific about your problem. Don't expect anyone here to read your thoughts and see what you really want.
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
when db updated i want to inform the relevent machine that it has got new record in the db .
ex:when db.table 'complaint'updated by a new complaint from a customer ('connection too slow') the hardware dept computer should be informed .
how can i do this or could you please send me some links.
in my project i'm using c#.
|
|
|
|