Y
yy
I want to access SQLserver directly in CF, so I write code like this:
conSql2000 = new SqlConnection(
"UID=SQL;Password=hello;data source=desktop IP;persist security
info=True;database=DotNetCF");
SqlCommand sqlGetOvertimeRates = new SqlCommand(
"SELECT OvertimeRateID,Description " +
"FROM OvertimeRates " +
"ORDER BY Description ",
conSql2000);
//open the connection
conSql2000.Open();
But thing make me sad is: it tell me the "SqlServer is not exit or the
Access is rejected", But I try to run the
Application which under /Debug on my destop pc. I found it work fine. I can
connect to sqlserver and retrieve the data.
Is there any thing I need to change, I mean things about the settings of
sqlserver? The server and the emulator runs on the same pc.
I can't figer out why. Who knows, please help me. Thanks forward!
conSql2000 = new SqlConnection(
"UID=SQL;Password=hello;data source=desktop IP;persist security
info=True;database=DotNetCF");
SqlCommand sqlGetOvertimeRates = new SqlCommand(
"SELECT OvertimeRateID,Description " +
"FROM OvertimeRates " +
"ORDER BY Description ",
conSql2000);
//open the connection
conSql2000.Open();
But thing make me sad is: it tell me the "SqlServer is not exit or the
Access is rejected", But I try to run the
Application which under /Debug on my destop pc. I found it work fine. I can
connect to sqlserver and retrieve the data.
Is there any thing I need to change, I mean things about the settings of
sqlserver? The server and the emulator runs on the same pc.
I can't figer out why. Who knows, please help me. Thanks forward!