Click here to Skip to main content
15,913,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: Force user to submit excel file Pin
Daniel Turini26-Aug-05 15:27
Daniel Turini26-Aug-05 15:27 
QuestionFilter non-arabic unicode characters from a string Pin
Gulfraz Khan26-Aug-05 7:27
Gulfraz Khan26-Aug-05 7:27 
Questionbutton Pin
magnifique26-Aug-05 3:36
magnifique26-Aug-05 3:36 
AnswerRe: button Pin
Not Active26-Aug-05 3:40
mentorNot Active26-Aug-05 3:40 
GeneralRe: button Pin
Rikaino26-Aug-05 7:17
Rikaino26-Aug-05 7:17 
QuestionChannel sinks Pin
esjq26-Aug-05 2:51
esjq26-Aug-05 2:51 
AnswerRe: Channel sinks Pin
esjq30-Aug-05 21:48
esjq30-Aug-05 21:48 
QuestionWeb service problem Pin
26-Aug-05 2:49
suss26-Aug-05 2:49 
Hi everyone.

I don't often use web services, so could be missing something here, but I'm really stumped.

I have created two web services, one of which seems to work exactly as it should. In that webservice, i have the following code:


public ArrayList GetItems(int repid)

{

SQLConnection sql=new SQLConnection();

sql.Open();

ArrayList items=new ArrayList();

OleDbDataReader dr=sql.Get_DataReader("Select lblname, Ftooltip, maxlength, itemindex, id from form where repid="+repid+" order by itemindex");

while (dr.Read())

{

items.Add(new string[] {dr.GetString(0), dr.GetString(1), dr.GetInt32(2).ToString(), dr.GetInt32(4).ToString()});

}

dr.Close();

sql.Close();

return items;

}

This does what it should, and returns an array of type object[], where each instance is of type string[]. Fine.

In another webservice, I have this code: (different project, but both are C#.net webservices)


public ArrayList GetMsgHeaders()

{

SQLConnection sql=new SQLConnection();

sql.Open();

ArrayList info=new ArrayList();

OdbcDataReader dr=sql.Get_DataReader("Select * from message");

while (dr.Read())

{

info.Add(new string[] {dr.GetInt32(0).ToString(), dr.GetString(1), dr.GetInt32(3).ToString()});

}

dr.Close();

sql.Close();

return info;

}

Now, i thought they were much the same thing, but when I use this one, the application crashes, telling me:

Additional information: Server was unable to process request. --> There was an error generating the XML document. --> The type System.String[] may not be used in this context.

What have I done wrong?!



-- modified at 8:50 Friday 26th August, 2005
QuestionIs Shockwave Fash object in c# can help me to handle actions in flash? Pin
3DoorsDown26-Aug-05 2:33
3DoorsDown26-Aug-05 2:33 
AnswerRe: Is Shockwave Fash object in c# can help me to handle actions in flash? Pin
3DoorsDown26-Aug-05 2:40
3DoorsDown26-Aug-05 2:40 
GeneralRe: Is Shockwave Fash object in c# can help me to handle actions in flash? Pin
| Muhammad Waqas Butt |27-Aug-05 4:55
professional| Muhammad Waqas Butt |27-Aug-05 4:55 
GeneralRe: Is Shockwave Fash object in c# can help me to handle actions in flash? Pin
3DoorsDown27-Aug-05 20:29
3DoorsDown27-Aug-05 20:29 
QuestionTranslate DLL (C++ 6.0 to C#.NET) Pin
gr196726-Aug-05 2:09
gr196726-Aug-05 2:09 
AnswerRe: Translate DLL (C++ 6.0 to C#.NET) Pin
Daniel Turini26-Aug-05 2:17
Daniel Turini26-Aug-05 2:17 
AnswerRe: Translate DLL (C++ 6.0 to C#.NET) Pin
Andrew Kirillov26-Aug-05 2:28
Andrew Kirillov26-Aug-05 2:28 
QuestionControls Flicker(Please Help If You Have Solution) Pin
Navees Ahmed26-Aug-05 2:04
Navees Ahmed26-Aug-05 2:04 
AnswerRe: Controls Flicker(Please Help If You Have Solution) Pin
sreejith ss nair26-Aug-05 3:13
sreejith ss nair26-Aug-05 3:13 
QuestionHow to serialize a set of classes? Pin
bouli26-Aug-05 0:38
bouli26-Aug-05 0:38 
AnswerRe: How to serialize a set of classes? Pin
Daniel Turini26-Aug-05 2:09
Daniel Turini26-Aug-05 2:09 
GeneralRe: How to serialize a set of classes? Pin
bouli26-Aug-05 6:37
bouli26-Aug-05 6:37 
Question.NET Dependency Viewer Pin
MrEyes25-Aug-05 23:46
MrEyes25-Aug-05 23:46 
AnswerRe: .NET Dependency Viewer Pin
Duncan Edwards Jones26-Aug-05 0:11
professionalDuncan Edwards Jones26-Aug-05 0:11 
AnswerRe: .NET Dependency Viewer Pin
eggie526-Aug-05 7:06
eggie526-Aug-05 7:06 
Questionhow to send sms using c#.net Pin
Anonymous25-Aug-05 22:09
Anonymous25-Aug-05 22:09 
AnswerRe: how to send sms using c#.net Pin
Blashyrkh#25-Aug-05 22:33
Blashyrkh#25-Aug-05 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.