Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating ASP.NET 2.0 with Access to SQL Server.

Status
Not open for further replies.

rnooraei

Programmer
Apr 5, 2005
74
CA
Hi
I have a small application which has been built with ASP.NET 2.0 and Access database. Now I want to move this application to SQL Server, Should I rebuilt the datasource with SQL Server? I did change the connection string but didn't work for me. any help appreciated.

here the sample of my compiler error message

Me._commandCollection = New System.Data.SqlClient.SqlCommand(3) {}
Me._commandCollection(0) = New System.Data.SqlClient.SqlCommand
Me._commandCollection(0).Connection = Me.Connection
Me._commandCollection(0).CommandText = "SELECT tblDeptDivSects.*"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM tblDeptDivSects"
Me._commandCollection(0).CommandType = System.Data.CommandType.Text
Me._commandCollection(1) = New System.Data.OleDb.OleDbCommand
Me._commandCollection(1).Connection = New System.Data.OleDb.OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings("BarConnectionString").ConnectionString)


Thanks
 
Code:
    Me._commandCollection(1) = New System.Data.OleDb.OleDbCommand
            Me._commandCollection(1).Connection = New System.Data.OleDb.OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings("BarConnectionString").ConnectionString)

try using the objects in the System.Data.SqlClient namespace, not the OleDb ones...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top