473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sqlconnection does it work with MS Access database

Hi
I wounder if I can use Sqlconnection or other Sql members to work with a MS
Access database. I have tried to connect to Access's database Northwind, but
when I set the data source to C:\Program\Microsoft Office\Office\Samples
(Northwind's path), I get an invalid connection. And I have seen in other
people's source code that they sometimes doesn't give the data source or
doesn't give the database's path to the data source, I don't understand how
I can connect to a database without giving the database's path.

Fia
Dec 12 '05 #1
5 7570
"Familjen Kalrsson" <fi*****@telia.com> schrieb
Hi
I wounder if I can use Sqlconnection or other Sql members to work
with a MS Access database.
Not at all. As the name says, it is an *SQL*connection which connects to an
*SQL*Server. Use an OleDBConnection and use the Jet OleDB Provider with it.
And I have seen in other people's source code
that they sometimes doesn't give the data source or doesn't give the
database's path to the data source, I don't understand how I can
connect to a database without giving the database's path.


Example?
see also:
http://www.connectionstrings.com
Armin

Dec 12 '05 #2
Familijen,

As it is about connections have than a good look at the new possibilities
from 2.0

http://msdn2.microsoft.com/en-us/lib...erfactory.aspx

I hope this helps,

Cor
Dec 12 '05 #3
Cor, do you have any links to examples of where this class is implemented.
The M'soft documentation is very minimal.
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Familijen,

As it is about connections have than a good look at the new possibilities
from 2.0

http://msdn2.microsoft.com/en-us/lib...erfactory.aspx

I hope this helps,

Cor

Dec 12 '05 #4
Dennis,

There is a complete very nice sample in the 101 VB 2005 samples.

http://msdn.microsoft.com/vstudio/do...s/default.aspx

Cor

"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:62**********************************@microsof t.com...
Cor, do you have any links to examples of where this class is implemented.
The M'soft documentation is very minimal.
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Familijen,

As it is about connections have than a good look at the new possibilities
from 2.0

http://msdn2.microsoft.com/en-us/lib...erfactory.aspx

I hope this helps,

Cor

Dec 12 '05 #5
Thanks Cor..
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,

There is a complete very nice sample in the 101 VB 2005 samples.

http://msdn.microsoft.com/vstudio/do...s/default.aspx

Cor

"Dennis" <De****@discussions.microsoft.com> schreef in bericht
news:62**********************************@microsof t.com...
Cor, do you have any links to examples of where this class is implemented.
The M'soft documentation is very minimal.
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Familijen,

As it is about connections have than a good look at the new possibilities
from 2.0

http://msdn2.microsoft.com/en-us/lib...erfactory.aspx

I hope this helps,

Cor


Dec 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephen | last post by:
I'm experiencing a strange problem that has me baffled. I created a webservice with a webmethod that connects to a remote MS SQL Server. It works fine when connecting to one server (running SQL...
16
by: ed_p | last post by:
Hello, I have implemented the singleton pattern for a class to hold a SqlConnection object that will be used thruout the application to create commands. My application is a simple Windows Form...
11
by: Bob | last post by:
In our new .NET web applications, we try to limit the use of SqlConnection to just one instance per page, even if there are multiple accesses to various queries. The thinking behind is that this...
3
by: Catadmin | last post by:
Hello, Everyone. I have a strange one here. I'm a DBA with relatively low program experience. Recently I was given an assignment to locate why our SQL Server has "orphaned" connections. The...
2
by: StephenRichter | last post by:
I have SqlServer loaded on my w2k system. The freeby I just downloaded from MS. Within WebMatrix I created a database. called it "WebMatrix" In WebMatrix I connect to the database. server:...
15
by: sflynn | last post by:
I've just created a new program in Visual Studio 2005, Visual Basic. I can publish, install, and run the program just fine as long as the user is a member of the "Domain Admins" group. My problem...
2
by: Dan Aldean | last post by:
Hi, I use the same connection string in a Windows and then in a WEB application to connect to SQL Server. When I try it in the WEB it doesn't work, private SqlConnection conTest = new...
2
by: axel22 | last post by:
Ok here it goes. 1. I've created a new web service project in F:\c#\WebSites\ServisBaze. 2. I've published the web service with IIS in a virtual directory who's actual path is:...
4
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, I've written a web application that I'm simply trying to use to access a database. When I run the application locally (or as an NT Service) it can easily access the remote SQL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.