Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 9th, 2003, 01:57 PM
tom_meir tom_meir is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 15 tom_meir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to tom_meir
Using the databes throu a server

I have a program that uses a database using ADO and DAO components. and now I need to put the database files on a server and make a client program that uses the database from another computer on the local network. how do I call the database files and manipulate it (probably using SQL I imagine?) without changing too much of my current program.
(please provide examples)

Reply With Quote
  #2  
Old November 9th, 2003, 02:05 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,849 Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level)Doug G User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 23 h 58 m 10 sec
Reputation Power: 766
With ADO you shouldn't need to do much. If you are using a DSN, just change the DSN to point to a different database. Your application shouldn't know the difference.

I don't know about DAO.

Reply With Quote
  #3  
Old November 10th, 2003, 08:02 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,176 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 42 m 4 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
a question... why are you using ADO AND DAO? It would seem that ADO would be enough to cover DAO (considering that it is it's replacement)
__________________
Fisherman

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein

Reply With Quote
  #4  
Old November 10th, 2003, 09:08 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Different between ADO and DAO:
Each of these are data access interfaces--mechanisms for programmers to
access data stored in a database.
DAO is designed to access JET/Access databases (only). It includes a great
deal of flexibility to deal with DDL/DML issues and manage the database
schema.

ODBC is an API interface designed to access any relational database that
supports an ODBC driver. DAO uses ODBC behind the scenes to access
relational databases (albeit not very efficiently).

ADO (COM-based "classic") is a VB-accessible route to the OLE DB data access
interface which uses "providers" (like ODBC drivers) to access data in
relational and non-relational databases. ADO is generally accepted as the
defacto standard way to access data from VB, C++ and Office applications.
ADO's biggest problem is COM and DLL hell issues.

ADO.NET is an entirely new data access interface built into the .NET
Framework. It bears little resemblance to ADO classic. It is COM-less and
shares none of the DLL hell issues with it's predecessor.

DAO and ADO are both client-side "data consumer" object
classes while ODBC is a standard for "data providers".

You use either DAO or ADO with ODBC. DAO is supposed to
be optimized for ODBC while ADO is optimized to OLD DB,
which is another data provider. (I'm pretty sure you can
use DAO with OLE DB as well.)

DAO is a predecessor to ADO - ODBC is a predecessor to
OLE DB.

Microsoft recommends ADO/OLE DB for new development but
that converting DAO code to ADO may not be worthwhile in
terms of performance improvement, etc.

Reply With Quote
  #5  
Old November 10th, 2003, 09:19 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,176 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 42 m 4 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
exactly my point, CP - if you're writing a new project, then I don't see any reason to use both ADO and DAO, as ADO can handle the processing just fine. However, on older projects which are being revised, I can understand leaving DAO alone.

Reply With Quote
  #6  
Old November 10th, 2003, 09:43 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Yes,I am agreed to FisherMan!

Reply With Quote
  #7  
Old November 19th, 2003, 12:10 PM
tom_meir tom_meir is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 15 tom_meir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to tom_meir
Your about right. I have this program for employee's to check in and out of so their work time could be calculated. But I need to change it now so that the database will be located on a server and every employee would check in on their terminal and the program will change the database on the server.
This program contains both ADO and DAO. I left the old DAO because I dont know how to change it to ADO (the dao is created not using components, but with code. And the syntax for ADO is defferent). But I dont know much about DSN and I dont know **** about server related database.

please help me

Reply With Quote
  #8  
Old November 19th, 2003, 01:42 PM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,176 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 42 m 4 sec
Reputation Power: 111
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
Honestly, Tom, my advice would be to do this.

1. Get rid of DSN's. I never use them. I know they make things simpler as far as updating a central piece of information, but I don't like them. The closest I ever come to a DSN is by declaring a [DATABASE] section in an .ini file I include with my build, and then putting a line in there declaring DSN="SomeMachine", but I don't even do that often.

While you're at it, I would switch to SSPI (secured, integrated access using Windows Authentication). It's a simple switch in your connection string, and it get rid of any hard coded usernames and passwords.

2. Take a little time, and try to find out what the DAO Code is accomplishing. You can probably examine any query statements and get a good idea. Once you know what is required.. I would seriously consider switching it to ADO.

3. This is more of a question... what kind of DBMS are you using. Is it Oracle, SQLServer... or what? There could be some other things you could do to streamline and even out processing distribution.

Reply With Quote
  #9  
Old November 20th, 2003, 10:24 AM
tom_meir tom_meir is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 15 tom_meir User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to tom_meir
Right know Im not using any of these (in replye to point 3), but Ill probably use SQL for the DBMS.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Using the databes throu a server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway