How can I connect to a SQL server(not SQL Compact Edition)Database from my Smart device. I am a bit stuck on this because the connection string does not seem to work it gives me a (Null reference error) I checked the SQLcommand text and that was working properly as well
This is the code I used
This is the connection string that was shown to me when I added the database connection and I tested the connection and it worked fine but still the data set is Null
string sConnection = "Data Source=SOFTSERVER;Initial Catalog=Resmanagement;User ID=sa;Password=thadiya";
This is the connection string i used earlier with the IP address and the Port on the server which I am connected to with a network.
string sConnection = "Data Source=192.168.1.1,1433;Initial Catalog=Resmanagement;User ID=sa;Password=thadiya;";
SqlConnection sqlceconn = new SqlConnection(sConnection);
SqlCommand command = sqlceconn.CreateCommand();
command.CommandText = "Select CashierName from REF_Cashiers";
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
even though there is one record in the table it still shows this error.
is there any thing to do in addition when using smart devices apps.