Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: capture data from Panasonic PBX using c# Pin
Richard MacCutchan21-Nov-13 6:09
mveRichard MacCutchan21-Nov-13 6:09 
GeneralRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 21:55
Arjun Mourya21-Nov-13 21:55 
GeneralRe: capture data from Panasonic PBX using c# Pin
Richard MacCutchan21-Nov-13 21:59
mveRichard MacCutchan21-Nov-13 21:59 
AnswerRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak21-Nov-13 1:58
mveDave Kreskowiak21-Nov-13 1:58 
AnswerRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 5:41
Arjun Mourya21-Nov-13 5:41 
GeneralRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak21-Nov-13 5:59
mveDave Kreskowiak21-Nov-13 5:59 
GeneralRe: capture data from Panasonic PBX using c# Pin
Arjun Mourya21-Nov-13 21:52
Arjun Mourya21-Nov-13 21:52 
GeneralRe: capture data from Panasonic PBX using c# Pin
Dave Kreskowiak22-Nov-13 1:38
mveDave Kreskowiak22-Nov-13 1:38 
QuestionHow to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL20-Nov-13 6:35
professionalFatih BURAL20-Nov-13 6:35 
QuestionRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Eddy Vluggen20-Nov-13 6:45
professionalEddy Vluggen20-Nov-13 6:45 
AnswerRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Pete O'Hanlon20-Nov-13 6:57
mvePete O'Hanlon20-Nov-13 6:57 
AnswerRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Bernhard Hiller21-Nov-13 3:13
Bernhard Hiller21-Nov-13 3:13 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL21-Nov-13 11:05
professionalFatih BURAL21-Nov-13 11:05 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Bernhard Hiller21-Nov-13 21:01
Bernhard Hiller21-Nov-13 21:01 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Fatih BURAL23-Nov-13 9:30
professionalFatih BURAL23-Nov-13 9:30 
GeneralRe: How to use BETWEEN two dates (datetimepicker) in SQLite with C#?? Pin
Eddy Vluggen27-Nov-13 9:08
professionalEddy Vluggen27-Nov-13 9:08 
QuestionHow to Make my Automatic Login works with this site ??? Pin
KishanAhir20-Nov-13 5:41
KishanAhir20-Nov-13 5:41 
AnswerRe: How to Make my Automatic Login works with this site ??? Pin
Manfred Rudolf Bihy20-Nov-13 6:26
professionalManfred Rudolf Bihy20-Nov-13 6:26 
GeneralRe: How to Make my Automatic Login works with this site ??? Pin
KishanAhir20-Nov-13 7:45
KishanAhir20-Nov-13 7:45 
Questioni am binding counrty dropdownlist from database data in that i want to display india first is it possible with use of sql query Pin
Member 957694920-Nov-13 0:52
Member 957694920-Nov-13 0:52 
QuestionRe: i am binding counrty dropdownlist from database data in that i want to display india first is it possible with use of sql query Pin
thatraja20-Nov-13 1:35
professionalthatraja20-Nov-13 1:35 
AnswerRe: i am binding counrty dropdownlist from database data in that i want to display india first is it possible with use of sql query Pin
thatraja20-Nov-13 1:51
professionalthatraja20-Nov-13 1:51 
Question[Solved] SqlCeException (0x80004005) Pin
emma.sun.sts19-Nov-13 23:33
emma.sun.sts19-Nov-13 23:33 
Hi,

I've been trying to get data from sql database within selected dates defined by datetimepicker. I've followed all necessary connection setup and query but there is this error SqlCeException at da.Fill(ds1, "upnp_daily"). It says a parameter is missing. I have tried all means but I couldn't spot where exactly goes wrong.

The following is my code. I really do appreciate it if someone could help me. Thanks in advance!

//-----Code-----

System.Data.SqlServerCe.SqlCeConnection con;
System.Data.SqlServerCe.SqlCeDataAdapter da;
DataSet ds1;

private void connectSQLserver()
{
//Connecting to SQL Server Express Database
string strDataSource = @"Data Source=C:\Visual Studio 2010\Projects\UPNP_Form_F\UPNP_Form_F\bin\Debug\upnp_database.sdf";
con = new System.Data.SqlServerCe.SqlCeConnection();
con.ConnectionString = strDataSource;
con.Open();

ds1 = new DataSet();

SqlCeCommand cmd = new SqlCeCommand();
cmd.CommandText = "SELECT * FROM upnp_daily_energy WHERE Date >= @p_StartDate AND Date <= @p_EndDate";
cmd.Parameters.Add("@p_StartDate", SqlDbType.DateTime).Value = dtpSTART; //get date from date time picker
cmd.Parameters.Add("@p_EndDate", SqlDbType.DateTime).Value = dtpEND;
cmd.Connection = con;
da = new System.Data.SqlServerCe.SqlCeDataAdapter(cmd.CommandText, cmd.Connection);

try //run the query
{
da.Fill(ds1, "upnp_daily"); //run the query
}
catch (Exception e2)
{
MessageBox.Show("Error 7: " + e2.ToString()); //<<--- Error here!
}

MessageBox.Show("Connection Open"); //<<---DEBUG
MaxRows = ds1.Tables["upnp_daily"].Rows.Count; //get no of rows in DataSet
MessageBox.Show("No of rows in DataSet = " + MaxRows.ToString());
}//------------------------------------------------------------------------------------

modified 28-Nov-13 2:33am.

AnswerRe: SqlCeException (0x80004005) PinPopular
OriginalGriff20-Nov-13 5:34
mveOriginalGriff20-Nov-13 5:34 
GeneralRe: SqlCeException (0x80004005) Pin
emma.sun.sts20-Nov-13 9:36
emma.sun.sts20-Nov-13 9:36 

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.