Hi All,
Can i use a Standard Exe to connect to a SQLServer database on Internet.
The connection string that works with ASP does not work with the exe.
Printable View
Hi All,
Can i use a Standard Exe to connect to a SQLServer database on Internet.
The connection string that works with ASP does not work with the exe.
of course, you can connect to SQL server. You have to give five inputs to the connection string.
1. Provider Name (SQLOLEDB for SQL Server)
2. Data Source (IP Address of the System, where your database is present. ex.214.22.23.22)
3. Username (Username of your database)
4. Password(Password of your database)
5. Database Name
ex.
create a connection object (conn)
conn.connectionstring = "Provider=SQLOLEDB;Data Source=214.22.23.22;uid=xyz;pwd=xyz;DataBase=ABC"
conn.open