Last post Nov 28, 2011 04:47 AM by hans_v
Nov 25, 2011 07:16 AM|shabbsali81|LINK
Is ther anyway i can change a Microsoft Access query to a query in VS 2008.
Nov 25, 2011 02:45 PM|sreejukg|LINK
If you are working against access database in VS 2008, then it will be ok, if you are using SQL server, then you might need to rewrite the query to comply with SQL. Any how it depends on the query you are using
Nov 25, 2011 08:18 PM|hans_v|LINK
Is ther anyway i can change a Microsoft Access query to a query in VS 2008
You need to explain what exactly you wan't to do? When you want to connect to an Access Database, an .mdb (access 2003 and lower) or .accdb (Access 2007 and higher), you need to use OleDb.
When using OleDb, you need to realize that you can only access the tables and queries in the database file. Other objects are not available. That also means that you cannot use all functions that are available in Access. For example, the Replace function
isn't available. And when using the Like parameter, the wilcard character is %, in Access it is *. But most queries will work just like in Access....
Nov 28, 2011 04:30 AM|shabbsali81|LINK
Currently we are using a front end in Microsoft Access and a SQL Back End, we are recreating the Front End in Visual Studio 2008, Parts of it in ASP.NET to move certain users to access the New System via the Web, It would make my life easier if their is
some way to import the queries into VS rather than recreating every single one.
Nov 28, 2011 04:47 AM|hans_v|LINK
It would make my life easier if their is some way to import the queries into VS rather than recreating every single one.
What do you mean? If you've queries stored in the Access database, you can execute them just like a SQL Server Stored Procedure. Set the
CommandText Property to the name of the query, and the CommandType Property to StoredProcedure.
The only problem can be when you're using a function that isn't supported in OleDb of when using the like operator, as explained in my previous reply, since you want to support the Access Front end as wel. In that case, you need to create a query for teh
Access Front end, as wel for the ASP.NET frontend