1.what is the mean of dsn file my friend said that is the easy way to make network aplication
2. is that no problem when 2 user or more do add data to my network aplication and and update it in same time?
You have some work to do to get up to speed. You're asking good and perceptive questions, but the answers to these are very basic. I'll give you some general answers, and some direction as to what to read up on.
First, your friend is a bit behind the times. DSN files are part of ODBC, which has been considered old technology for at least 7 years! There are various reasons not to use them. You'll want to read up on ADO, which is much more flexible and therefore easier to use in the long run.
As for your second question, well, it's a very good one. Yes, indeed, it is a problem. It's handled by record locking. You'll want to read up on "optimistic locking" and "pessimistic locking."
Now, if you are about to ask me where to find information on all these, my answer in advance is that google is your best friend.
So, I would suggest that you first learn how to open an ADO Recordset with data from your database in it. If you run into specific difficulties, post back.
i have run it and success in stand alone program but how about i update data at the same time with 2 or more computer. i always use custom properties in ado control to set it. if you have any suggestion please tell me step by step.
You have to take a few steps backwards before you can progress further. So, step one: stop using the ADO control, and learn to use ADO objects. Step two: follow through on the suggestions already given. Once you have accomplished these, come back for more steps.
There are a number of tutorials on ADO, many for use with ASP but there are some for use with VB6. You can google for ADO tutorial, but you can start with
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?' Drive a Steam Roller
I'm sure that this isn't what Bob was trying to say, but I'd just like to clarify: ADO is not a replacement for ODBC (that prize more properly goes to OLE DB); rather it is a replacment for DAO, RDO and (the somewhat lesser-known) ODBCDirect.
And I'm not sure that I completely agree that DSNs are out of fashion - although it is certainly fair to say that many of the benefits of a File DSN can also be achieved by a UDL file (which itself has the additional benefit of working with OLE DB sources)
Yes, that clarifies what I was saying, thanks strongm. Furthermore, there are certainly places that DSN's are useful.
However, for the OP's benefit, I reiterate to avoid any confusion: get up to speed in ADO, and use it as your primary means of accessing data. I suspect the other posters will agree with me on this.
Agree, but DAO still faster if using ms access as the database but ADO faster in every other way!
Oh and your right BobRodes Never use ado controls in vb as i did alot speed test on these agaist ado object and the vb controls where up to x4 slower! How craps that!
but if 2 user or more update at the same time is there any conflict if i use ado ? for faster the database i have a better solution. only update problem is my concern now?
so which i must use :
ADO or DSN File and how to do it. step by step ok. thanks you all i use access. thanks johnwm for the web i will lear it first.
In ado depends how you lock the recordset when you open it but it will give you an error telling you the data's changed or locked or read only.
Or another (Hard way) is to manage the records your self by adding a field in the tables called ie. 'ISAccess' and then when user opens a record, see if it's advailble ie. if ISAccess<>0 show that record is accessed by <user id>. If ISAccess=0 then update record with <user id>, then read data. When the user is finished just update the ISAccess with 0.
I repeat my previous suggestion to read up on optimistic and pessimistic locking, and also repeat my suggestion to follow through on the suggestions given. If you want someone to provide you with step by step instructions, I suggest you consult the MSDN documentation, where you will find what you are looking for. Start with
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.