Click here to Skip to main content
15,923,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to improve preformance of drawing in c# Pin
Eddy Vluggen15-Sep-09 2:39
professionalEddy Vluggen15-Sep-09 2:39 
Questionredirect to PHP page from C# code Pin
Alaa Telfah15-Sep-09 1:32
Alaa Telfah15-Sep-09 1:32 
AnswerRe: redirect to PHP page from C# code Pin
SeMartens15-Sep-09 1:37
SeMartens15-Sep-09 1:37 
QuestionConvert The Layout Of The Application Between Arabic And English Pin
Thaer Hamael15-Sep-09 1:20
Thaer Hamael15-Sep-09 1:20 
AnswerRe: Convert The Layout Of The Application Between Arabic And English Pin
Keith Barrow15-Sep-09 1:34
professionalKeith Barrow15-Sep-09 1:34 
QuestionIsolation Levels Pin
scotlandc15-Sep-09 0:53
scotlandc15-Sep-09 0:53 
QuestionThumbnail of minimized Form Pin
Paw Jershauge15-Sep-09 0:39
Paw Jershauge15-Sep-09 0:39 
AnswerRe: Thumbnail of minimized Form Pin
musefan15-Sep-09 1:21
musefan15-Sep-09 1:21 
GeneralRe: Thumbnail of minimized Form Pin
Paw Jershauge15-Sep-09 2:01
Paw Jershauge15-Sep-09 2:01 
AnswerRe: Thumbnail of minimized Form Pin
Henry Minute15-Sep-09 1:38
Henry Minute15-Sep-09 1:38 
GeneralRe: Thumbnail of minimized Form Pin
Paw Jershauge15-Sep-09 2:03
Paw Jershauge15-Sep-09 2:03 
GeneralRe: Thumbnail of minimized Form Pin
Henry Minute15-Sep-09 2:11
Henry Minute15-Sep-09 2:11 
GeneralRe: Thumbnail of minimized Form Pin
Paw Jershauge15-Sep-09 6:25
Paw Jershauge15-Sep-09 6:25 
Questionhow to clear the value of the ASP.NET FileUpload control in Web application. Pin
coolsharath15-Sep-09 0:00
coolsharath15-Sep-09 0:00 
AnswerRe: how to clear the value of the ASP.NET FileUpload control in Web application. Pin
Keith Barrow15-Sep-09 0:05
professionalKeith Barrow15-Sep-09 0:05 
QuestionCustomer Grid View Pin
Syed Shahid Hussain14-Sep-09 23:59
Syed Shahid Hussain14-Sep-09 23:59 
AnswerRe: Customer Grid View Pin
Henry Minute15-Sep-09 1:48
Henry Minute15-Sep-09 1:48 
GeneralRe: Customer Grid View Pin
Syed Shahid Hussain15-Sep-09 2:56
Syed Shahid Hussain15-Sep-09 2:56 
GeneralRe: Customer Grid View Pin
Henry Minute15-Sep-09 3:05
Henry Minute15-Sep-09 3:05 
Questionhide the text in specified position? Pin
raj23136214-Sep-09 23:26
raj23136214-Sep-09 23:26 
AnswerRe: hide the text in specified position? Pin
musefan14-Sep-09 23:37
musefan14-Sep-09 23:37 
GeneralRe: hide the text in specified position? Pin
raj23136214-Sep-09 23:48
raj23136214-Sep-09 23:48 
QuestionPassing a table (DataTable) value as a parameter to stored procedure Pin
sanjubaba14-Sep-09 23:22
sanjubaba14-Sep-09 23:22 
Hi,
   I am trying to pass a datatable as a parameter to a stored procedure. my sql server is 2008.
Also my database transactions happens with the class from enterprise library January 2006.
Following is my code:

DataTable dt = new DataTable();

                  DataColumn dcol = new DataColumn("Col1", typeof(int));
                  dt.Columns.Add(dcol);

                  DataRow dr;
                  dr = dt.NewRow();
                  dr["Col1"] = 1;

                  dt.Rows.Add(dr);

                  SqlParameter parameter = new SqlParameter("@MenuRights", SqlDbType.Structured);
                  parameter.Value = dt;

                  DataTable dtbl = ExecuteDatabaseQuery.Reference.ExecuteQuery_DataTable(ConAdmin, "teststorepro", "teststorepro",
                        ProjectConstants.QueryType.StoredProc, null, true, null,
                        parameter);

When the sqlcommand is made and passed for executing, it throws an error
"Failed to convert parameter value to IEnumerable".

Following is the code from enterprise library:

Database db = (Database)CreateConnection(ConnectionName);

                        if (WriteInfoInLogFile == true && WriteToLogs == true)
                        {
                              CLogger.Reference.sLogInfo(ConnectionName, OptionName, oQuery, TypeOfQuery, CLogger.EStatus.StartProcess, LogMsg, CLogger.MsgType.Information, SQLParams);
                        }

                        DbCommand cmd = (DbCommand)CreateCommand(db, oQuery, TypeOfQuery, cmdTimeOutMin, SQLParams);

                        DataSet dstStorePro = db.ExecuteDataSet(cmd);

                        if (dstStorePro.Tables.Count > 0)
                        {
                              int TableCount = dstStorePro.Tables.Count;
                              for (int i = 0; i < TableCount; i++)
                              {
                                    DataTable dtbl = dstStorePro.Tables[i];
                                    Boolean HasMsg = GetStoreProMessage.GetMessage(dtbl);

                                    if (HasMsg == false)
                                    {
                                          dt = dtbl;
                                    }

                              }
                        }
when the command is passed to db.ExecuteDataSet(cmd); , it throws the above error.

Sandeep Kumbhar

AnswerRe: Passing a table (DataTable) value as a parameter to stored procedure [modified] Pin
sanjubaba15-Sep-09 17:26
sanjubaba15-Sep-09 17:26 
Questionusing google api in c#.net for google ad-sense search Pin
Anil Veeraghattapu 414-Sep-09 23:05
Anil Veeraghattapu 414-Sep-09 23:05 

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.