|
Dynast (m)
|
Need help on how to convert a stand alone database application to network based . The databese will be in a central computer say server,and users will enter records and manipulate the aplication from sveral clients. It shld be able to support concurrency
Hoping to hearing from You
|
|
|
|
|
|
Ayinkus (m)
|
The data source or reference will change to the location of the server hosting your database. I am making the assumpting that you are use a relational database system i.e. MS Sql, Oracle or MySql? Your connection manager will manage concurrent users and connection pooling. You will have to watch out for multi-user updates on your database records
|
|
|
|
|
|
Dynast (m)
|
Supposing the application is developed in VB 6.0 What connection string will be used such that it will allow data from several clients to enter the database and be manipulated concurrently by different users
|
|
|
|
|
|
Ayinkus (m)
|
Hi Dynast,
In your application you should have a connection object similar to dim cn As New ADODB.connection cn is your object that set it's properties. Provider,Security, catalogue and server.
As the application is deployed to each machine, each user's machine will know how to connect to the database server. Each connection will allow the user to perform the database tasks as defined in your application. It is as simple as that. If you really want to make things easy and the application will run over a domain, use an alias for the database server which can be resolved via DNS so you do not have to go to each machine if you need to change the location of the database server. i hope this make sense?
Let me know if you need more help
|
|
|
|
|
|
Dynast (m)
|
Thanks Ayinkus for your assistance
|
|
|
|
|
|
Dynast (m)
|
Thanks Ayinkus how do I make use of alias.I'm not quite conversant with that . I ll be glad if u will add more flesh to that
|
|
|
|
|
|
Ayinkus (m)
|
Hi, If your application runs in a domain environment, then you should have a DNS server, if not you need to edit your hosts file within the windows\system32 folder. Here you put DBServerIP Alias For example 10.10.10.1 TestDBServer
You then use the server name TestDBServer in your connection string thus aliasing the actual server identity. I normally have an entry named data that points at the server running my SQL2005 server, means if you get hacked someone won't find your DB server easily.
Let me know exactly what you are trying to do and I am sure I can help you out
|
|
|
|
|
|
Dynast (m)
|
Let me know exactly what you are trying to do and I am sure I can help you out
Thanks very kindly Ayinkus I have a stand alone software developed in VB and now I want to use it in a network ENVIRONMENT hence i neeed to restructure it so that it will be suitable in network environment to accept data from clients and store in a central database
|
|
|
|
|
|
IG
|
Like Ayinkus pointed out. All you need to do is adjust the connectionstring of your database connection within your vb program to specify the machine where the database is located and you're good to go. But that will work with client/server databases like MSSQL server. If you're using access then I think you'll need to migrate your database to a mature database system like MSSQL.
|
|
|
|
|
|
Ghenghis (m)
|
You'll have to change your queries to support concurrency , like SELECT FOR UPDATE , or use tricks like optimistic concurrency , where you compare the record to be updated with the record before the update , if they're different , then the record has changed etc. Its not exactly trivial but you'd need to ask yourself what the impact of concurrent users would do to your app, the impact might not really be much , have fun 
|
|
|
|
|
|
MisterMan (m)
|
If you are using something like Access or FoxPro as the database, you can use DNS-less access. I suppose it should work with all kinds of database. However, I have not used it with SQL but it should work. The advantage here is that the computer does the house keeping itself.
|
|
|
|
|
|