Click here to Skip to main content
16,011,585 members
Home / Discussions / C#
   

C#

 
QuestionBase class method call ? Pin
chettu1-Aug-05 19:21
chettu1-Aug-05 19:21 
AnswerRe: Base class method call ? Pin
S. Senthil Kumar2-Aug-05 2:11
S. Senthil Kumar2-Aug-05 2:11 
AnswerRe: Base class method call ? Pin
Christian Graus2-Aug-05 2:13
protectorChristian Graus2-Aug-05 2:13 
GeneralRe: Base class method call ? Pin
chettu2-Aug-05 2:34
chettu2-Aug-05 2:34 
GeneralRe: Base class method call ? Pin
Christian Graus2-Aug-05 14:09
protectorChristian Graus2-Aug-05 14:09 
GeneralProblem with PrintPreviewDialog Pin
kbalias1-Aug-05 19:21
kbalias1-Aug-05 19:21 
GeneralRe: Problem with PrintPreviewDialog Pin
Alomgir Miah2-Aug-05 3:12
Alomgir Miah2-Aug-05 3:12 
Generalsql ce Database problem help me........ Pin
limxiuyao1-Aug-05 18:51
limxiuyao1-Aug-05 18:51 
i am using remote data access for my project. this is my code.

private void button2_Click(object sender, System.EventArgs e)
{

SqlCeConnection cn = null;
SqlCeRemoteDataAccess rda= null;
SqlCeEngine sqlEngine=null;
try
{
button2.Enabled=false;
//Create database if it doesn't already exist
if(!File.Exists("\\My Documents\\Student.sdf"))
{
sqlEngine=new SqlCeEngine( );
sqlEngine.LocalConnectionString="Data Source=\\My Documents\\"+
"Student.sdf;"+
"Password= ;"+
"Encrypt Database=True";
sqlEngine.CreateDatabase();
sqlEngine.Dispose();
}

else
{
//open the connection to the database
cn=new SqlCeConnection("Data Source=\\My Documents\\"+
"Student.sdf; Password=");
cn.Open();
SqlCeCommand cmd=cn.CreateCommand();
//drop table tutorial1_Classlist
cmd.CommandText="DROP TABLE tutorial1Class_list";
cmd.ExecuteNonQuery();

//close the conection
if(cn.State!=ConnectionState.Closed)
{
cn.Close();
}
}
//Instantiate the RDA Object
rda=new SqlCeRemoteDataAccess();
//Connection String to the Sql Server
string remoteConnectString="Provider=SQLOLEDB;"+
"Data Source=IT768P27;"+
"Initial Catalog=Student;"+
"User Id=sa;" +
"Password=";// empty password
rda.InternetLogin="";
rda.InternetPassword="";
rda.InternetUrl="http://IT768P27/StudentRDA/sscesa20.dll";
rda.LocalConnectionString="Data Source=\\My Documents\\"+
"Student.sdf;"+
"SSCE:Database Password=";

rda.Pull("tutorial1Class_list", "Select * from tutorial1Class_list",
remoteConnectString,RdaTrackOption.TrackingOn);
}
catch(SqlCeException sqlex)
{
foreach(SqlCeError sqlError in sqlex.Errors)
{
MessageBox.Show(sqlError.Message,"Error");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message,"error");
}
finally
{
rda.Dispose();
button2.Enabled=true;

}

}

when i run it in my pocketpc ,it give me error like "sql server ce encountered problems in creating the sql server ce database[...connection string..]..
what should i do.. i c every codeing is all right. can u tell me what is wrong with my connection string?

GeneralRe: sql ce Database problem help me........ Pin
LongRange.Shooter20-Jan-06 6:32
LongRange.Shooter20-Jan-06 6:32 
QuestionHow can I.. Pin
KORCARI1-Aug-05 17:57
KORCARI1-Aug-05 17:57 
AnswerRe: How can I.. Pin
Christian Graus1-Aug-05 18:28
protectorChristian Graus1-Aug-05 18:28 
QuestionHow can I.. Pin
KORCARI1-Aug-05 17:55
KORCARI1-Aug-05 17:55 
GeneralDropDownList Pin
tatchung1-Aug-05 17:50
tatchung1-Aug-05 17:50 
GeneralRe: DropDownList Pin
Christian Graus1-Aug-05 18:33
protectorChristian Graus1-Aug-05 18:33 
GeneralRe: DropDownList Pin
tatchung1-Aug-05 19:23
tatchung1-Aug-05 19:23 
GeneralRe: DropDownList Pin
Christian Graus2-Aug-05 2:07
protectorChristian Graus2-Aug-05 2:07 
GeneralRe: DropDownList Pin
tatchung2-Aug-05 15:22
tatchung2-Aug-05 15:22 
GeneralRe: DropDownList Pin
Christian Graus2-Aug-05 15:30
protectorChristian Graus2-Aug-05 15:30 
GeneralRe: DropDownList Pin
tatchung2-Aug-05 15:39
tatchung2-Aug-05 15:39 
GeneralRe: DropDownList Pin
Christian Graus2-Aug-05 16:01
protectorChristian Graus2-Aug-05 16:01 
GeneralMulti- threads problem Pin
ppp0011-Aug-05 17:50
ppp0011-Aug-05 17:50 
GeneralRe: Multi- threads problem Pin
Robert Rohde1-Aug-05 19:08
Robert Rohde1-Aug-05 19:08 
GeneralDDE in longhorn Pin
ppp0011-Aug-05 16:24
ppp0011-Aug-05 16:24 
GeneralRe: DDE in longhorn Pin
Christian Graus1-Aug-05 16:29
protectorChristian Graus1-Aug-05 16:29 
GeneralRe: DDE in longhorn Pin
ppp0011-Aug-05 17:35
ppp0011-Aug-05 17:35 

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.