connecting to sql database

genesis

Registered User.
Local time
Today, 08:15
Joined
Jun 11, 2009
Messages
205
hi, i am not familiar with sql so please bear with me.

mdb is the file extension of the database of access. what is the file extension name of the database of SQL.

my other question is, the front end access can connect directly to mdb file thru visual basic code. Can front end access connect directly to the sql database file using code only and without any installed server?
 
I think there's some basics we need to understand first.

For any Relational Database Management System (RDBMS) products, be it SQL Server, MySQL, Oracle, PostgreSQL, Informix, DB/2, we do not use files as per. Rather we communicate with a daemon which then fulfills our requests. This is why they usually refer to such as server-client architecture.

In case of Access as a front-end client, we would use technology named Open Database Connectivity (ODBC) to enable Access to communicate with the daemon running the server. We have to then pass into parameters so Access know where the daemon is (e.g. the location and/or the name of server, the database name) as well the credentials (e.g. username and password) before Access can even initate any requests.

To use the tables from any RDBMS, we would use 'Linked Tables', which can be done by File -> Get External Data -> Link Tables, and select "ODBC Databases" as the file types (be sure to scroll all way to the very bottom of the long list of possible file extensions). This will then present you with DSN administrator where you can create new Data Source Name with the information Access needs to connect to any server with the appropriate ODBC driver. In case of SQL Server, ODBC driver is already installed. For any other RDBMS such as Oracle or MySQL, you have to go to their own website and download their ODBC driver.

Finally, do a google search for Doug J. Steele's DSN-less connection, which is the answer to doing the connection via VBA.

The question "without any installed server" is strange; you cannot have communication with a server if no such server exists. It must be installed. But maybe you mean not installed on the client machine? If so, then all you need is the ODBC driver mentioned above and the information to connect to the server wherever it is at.
 
For example, I made a front-end ms access and I made an sql database from my one computer with sql server. Then I bring the front-end and sql database file to a computer WITHOUT A SERVER intalled on it. Can I still connect the front-end to the sql database just using vba code.
 
No. Only the daemon know what to do with a .mdf file (I'm assuming this is Microsoft SQL Server we're talking about), and you need to have a daemon to manage the file to fulfill any data requests.
 
I see. its clear to me now. So I really need to install the ms sql server there!

Let me summarize this if I get it.

MS Access needs an ODBC connection to the DAEMON which is in-charge to communicate with the sql database file (.mdf).

Am I correct?

So for example, I have package for deployment my access application to the user, so I need the user also to install sql server to be able to use my mdf file?
 
Close but not quite.

You need *exactly* one server.** Any numbers of clients can then connect to the same server remotely or locally so they never need to have access to .mdf file (and that's how we have better security- denying them the access to the actual files and let the daemon handle the requests).

Each client must have ODBC driver installed on their machine but they do not have to have SQL Server installed on their machine; they just need to be able to connect to the machine that hosts the SQL Server. So you really only need one machine that's configured with SQL Server and has its networking set up to listen on ports from any clients.

For more info: Beginner's Guide to ODBC (includes several links as well)

** Technically, it doesn't have to be exactly one server but this is usually a special case involving replication, which is well beyond the scope here and thus not applicable.
 
ok. but for example there is only one computer. that computer serves as server and client. can that still be possible...
 
As I said, you just need to have an instance of SQL Server *somewhere*, but client can connect to it whether locally or remotely, so it's possible that a machine can be both server and client.

But that's usually in case of development. When you deploy the server, it's usually the norm that clients connect to the server remotely, rather than locally.
 
thank you for the information.

can you suggest what would be the best sql server that I should use that I can also deploy for the users.

and can you teach me where to start to build the tables.
 
thank you for the information.

can you suggest what would be the best sql server that I should use that I can also deploy for the users.

as of the moment I am studying sql server 2000 and creating tables.

can you tell me what is the best sql server edition that I should use? and why?
can you also give me links to where I can get reference on how to work around in ms sql server. thanks
 

Users who are viewing this thread

Back
Top Bottom