HIARCS Chess Forums Forum Index HIARCS Chess Forums
World Championship winning computer chess software program & downloads for chess database, analysis and play on PC, Mac and iPhone
 
 QuestionsQuestions   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Private MessagesPrivate Messages   Log inLog in 

Unable to connect to a remote database through ASP. NET

 
Post new topic   Reply to topic    HIARCS Chess Forums Forum Index -> Programming Discussions
View previous topic :: View next topic  
Author
malvin
Member


Joined: 01 Jun 2015
Posts: 2

PostPosted: Thu Jun 11, 2015 3:47 am    Post subject: Unable to connect to a remote database through ASP. NET Reply with quote

I created a SQL Server Database with Direct Access and updated the connection string with the one provided by http://asphostportal.com.

There are no errors, but I see no data being stored in the database on a form submit.

Code to insert a row is as follows:

Code:
public int run_sql(string msg)
{
    SqlConnection conn = new SqlConnection();
    SqlCommand cmd = new SqlCommand();
    SqlDataAdapter da = new SqlDataAdapter();
    DataSet ds = new DataSet();
    conn.ConnectionString = connString;
    cmd = conn.CreateCommand();
    cmd.CommandText = msg;
    conn.Open();
    cmd.ExecuteNonQuery();
    conn.Close();
    return 1;

}


What could be the issue?
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    HIARCS Chess Forums Forum Index -> Programming Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP