Click here to Skip to main content
15,919,479 members

Comments by CrinaT (Top 5 by date)

CrinaT 23-Jul-12 13:41pm View    
Thank you so much,it helped me a lot!:)

One little comment on the code you wrote:
it's strings not string1 in the context:
stringFinal = string.Format("{0} set {1}{2}", string1[0], AddedString, string1[1]);
so what worked for me was :
stringFinal = string.Format("{0} set {1}{2}", strings[0], AddedString, strings[1]);

Thank you again>:D<
CrinaT 19-Jul-12 22:06pm View    
Well it worked fine for me at first,but by the time I got to the end of my five update statements with all their attributes it was giving me the index out of bounds error
CrinaT 19-Jul-12 22:02pm View    
I'm actually trying,but thanks for the irony.

You didn't tell me to do anything,you just told me what was wrong(which is kind of obvious,I'm looking for a solution)

Well I want it to exist even if he can see it or not.
I always have 2 strings in there,nothing more.
So mainly,do you know how I can always make it accept 2 elements?
CrinaT 19-Jul-12 21:52pm View    
Do you know how I can fix this?

I tried handling it like a normal array:

string[] string1 = null;
for (int x = 0; x < 2; x++)
{
string1[x] = toBeDivided.Split(delimitator, StringSplitOptions.None);
}


and got Error 1 Cannot implicitly convert type 'string[]' to 'string'
CrinaT 19-Jul-12 21:48pm View    
string toBeDivided = "update Evenimente set where Evenimente.id_E=(select id_E from Evenimente where nume_E like @numeEvenimentUniversal)";