Home » Open Source » Programming Interfaces » Unable to connect to a remote database through ASP. NET ( ASPHostPortal.com) (SQL, 2012, Windows Server)
Unable to connect to a remote database through ASP. NET ( ASPHostPortal.com) [message #638127] Wed, 03 June 2015 03:30 Go to next message
regina21
Messages: 1
Registered: June 2015
Junior Member
I have a ASP.NET website and an hosting account on asphostportal.com

I created a SQL Server Database with Direct Access and updated the connection string with the one provided by Go Daddy.

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:

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?
Re: Unable to connect to a remote database through ASP. NET ( ASPHostPortal.com) [message #638128 is a reply to message #638127] Wed, 03 June 2015 03:34 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

How is this related to Oracle?

Re: Unable to connect to a remote database through ASP. NET ( ASPHostPortal.com) [message #638129 is a reply to message #638127] Wed, 03 June 2015 03:59 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Your database is SQL Server and your question is not related to Oracle. Please search on internet and post it on a related forum. Topic locked.
Re: Unable to connect to a remote database through ASP. NET ( ASPHostPortal.com) [message #638131 is a reply to message #638129] Wed, 03 June 2015 04:51 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Unlocked until OP explains if there is anything (not posted) related to Oracle (or no answer in a couple of days).

Previous Topic: ODBC Connection Fails connection to Oracle 10g database
Next Topic: Locked individual records only for individual users on MS ACCESS
Goto Forum:
  


Current Time: Thu Nov 21 07:11:22 CST 2024