accessing ms access table using a service in vb.net - vb.net

can we access the msacces table using a windows service which is created in vb.net. Thanks!

Yes.
You can use an OleDbConnection with this connection string (or this one for 2007 / 2010).
You can then execute arbitrary SQL statements on the connection.

Related

Swap Database in visual studio from Access to SQL

I have created a windows form project which is based in vb.net in Visual Studio. This form acts as the front end to the database.
I decided this time round to try use the Dataset Designer in Visual Studio and found it convenient. Using the Wizard I linked up the MS Access database to create the Dataset in the project. This then automatically generated all the relevant table adapters, datasets, bindingsources and so on.
Now, the aim is to transition the same Access database to SQL-server.
The Question is whether it is possible to simply swap the Dataset in Visual Studio to from Access to SQL which have the same table names, structure, relations... I tried modifying the connection string in Settings.settings with no success.
This would save me a lot of time from going through each object and updating the datasource to the new SQL database.
You should be able to establish a separate connection to sql server using ado. You can find typical connection strings easily: try http://www.connectionstrings.com/microsoft-ole-db-provider-for-sql-server-sqloledb/ for example. If the tables exist in sql server, you can SELECT from Access and INSERT into SSvr using 2 different connections, 2 sql command objects. If you have trouble with the SQL (which is very possible, I have not done this with Access), create a dataset from the Access SELECT and use that as an intermediate step. If the tables do not exist yet, get the script for CREATE TABLE in Access or in SSMS, and execute that before doing the SELECT/INSERT operation.

Access 2010 connection string from VB.net without using the Access 2007 database engine

I have a VB.net program using an Access 2010 database. Thus far, I have been using the Access 2007 database engine and connection string as:
ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=MyDB.accdb;Jet OLEDB:Database Password=MyPassword"
This works fine but it requires the 32 bit Access 2007 database engine, which will not allow some 64 bit installations to be installed. Therefore, I am looking for the connection string that will work with Access 2010 and not require the Access 2007 DB runtime.
I have searched the web and this forum, and they all say to install the Access 2007 DB engine, which is exactly what I want to get away from.
Any thoughts would be greatly appreciated.
Thanks much!
Short answer: You can't.
There is no (practical) way to access an .accdb database without using the Access Database Engine.

Difference between Sql Connection and OLEDB Connection

What is the difference between the SQL Connection and OLEDB Connection? Is that OLEDB is common to all (also SQL Server)? To which are all Servers, OLEDB is using?
The advantage of using OleDbConnection is flexibility. You can change your database (for instance, move to Oracle)and not have to change your code.
If you using SQLServer as backend then use SQLConnection for better performance.
check with this link http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/fadb2742-d75a-49fb-a839-b2d4a9183998/
OleDbConnection : You can connect to any database, which you have provide for that.
Tip: use Universal Data Link File
SqlConnection is designed to access SQL Server, while OleDbConnection is designed to access any database.

Connect to the SQL instance using VB 6.0

How I can connect to the SQL instance using SMO with VB6.0?
I don't think you can because Microsoft.SqlServer.Smo.dll is not an ActiveX DLL, but depending on what it is you want to do you may be able to accomplish it using SQLDMO. Unfortunately Microsoft is ending support for SQLDMO after SQL 2008. You can read more at http://msdn.microsoft.com/en-us/library/ms141187%28SQL.100%29.aspx

how would i create,edit, read,use table in ms access via vb.net

how would i create edit read use table in ms access via vb.net please give me some help
You must create an ODBC connection in your VB script and then you can send SQL commands to the Access database.
See here for some code to get you started.
You should use ADO.Net and System.Data.OleDb (OleDbConnection, OleDbCommand, OleDbDataAdapter, OleDbDataReader) and even DataSets.
See this articlefor sample code.
There is a very clear tutorial to connect, retrieve, display, and update Ms Access database here..