Click here to Skip to main content
15,896,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have an window application with ms access database that facilitates various reports also.
Now i want to use SQL Server database.How can i convert my Application Compitable with sql server.

I tried by replacing OleDb by Sql in whole project and replaced conncetion string with sql server connection string.
but so much errors occured.
mostly are related to Table Adaptors and DataSets

Please suggest me some solution.

Thanks!
Posted
Comments
[no name] 7-Sep-11 9:01am    
this is the very simplest thing in Database programming.

1 solution

It's funny that you get errors from datasets. These are not database specific objects.

SqlClient classes are very close to equivalent OleDb classes (typically Sql classes have more functionality).

If you did the 'conversion' with search and replace, it could be that you have been replacing too much (text in the names etc).

Anyhow, I think that it's best to start from the beginning and just use Find to find the OleDb classes and then manually check each occurrence, how they should be modified. When you start doing this I think you quite quickly find a good search/replace pattern for each class. Then you can do the replacement pre each class.
 
Share this answer
 
Comments
[no name] 7-Sep-11 9:00am    
perfect !!!! my 5!!!!:)
Wendelius 7-Sep-11 9:03am    
Thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900