Key Work Driver not recognized.
I am trying to setup a connection string to a shared database. I cannot figure out why this connection string is not working so I thought I would seek help here. Here is the .aspx coding:
<%@ Page Language="C#" Debug="true" %>
<%@ Import Namespace = "System.Data.SqlClient" %>
<%@ Import Namespace = "System.Data.Odbc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>tester2.aspx</title>
<script runat="server" language="c#">
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("DRIVER={SQL Server}; SERVER=winsql3.abac.com;Database=jgrant_awcconnect ;" +
"UID=xxxx;PWD=xxxx");
SqlCommand comm = new SqlCommand("SELECT txt_username FROM usr_user", conn);
conn.Open();
SqlDataReader reader = comm.ExecuteReader();
employeesLabel.Text = (string)reader["txt_username"];
reader.Close();
conn.Close();
}
</script>
</head>
<body>
<form runat="server">
<asp:Label ID="employeesLabel" runat="server" />
</form>
</body>
</html>
Keyword not supported: 'driver' is the error I get.
I tried using the .udl file and here is what it returned:
[ODBC]
DRIVER=SQL Server
UID=awcconnect
DATABASE=jgrant_awcconnect
WSID=JIGS-PC
APP=Microsoft® Windows® Operating System
SERVER=winsql3.abac.com
Maybe I am using this wrong or maybe its something else I do not know. I would really appreciate any advice you might offer as far as how to resolve this problem. The shared hosting company is Aplus.net if that makes any difference. Thank you in advance.
|