|
-
Jan 9th, 2007, 02:13 PM
#1
Thread Starter
Fanatic Member
Client / Server Database application
Hello,
I want to clear something about Client Server Database application using Visual Basic 6.0 and SQL Server 2000 and ADO.
Is there any difference in Opening Recordset from the following ??
VB Code:
Set Rs = New ADODB.Recordset
With Rs
.Open "Select * from Tbl_Class_Reg where Class_Code = '" & TxtCode & "'", dB, adOpenDynamic, adLockOptimistic
End With
If any difference then what is that ?
What is Locking ??? Why we use it ??
Do we need 2 different softwares fro the same work for Clien and Server ? or just Install 1 software on server and open it from client ?
Please help me. Any code or application with code will be appriciated
Farooq
-
Jan 9th, 2007, 02:28 PM
#2
Re: Client / Server Database application
Moved to DB forum
Difference between that and what? That is a perfectly valid way to open a recordset.
The Locking options determine how edits by multiple users are handled by the provider (the driver that connects ADO to the database). These only really have an effect when two or more people edit the same record at the same time, and to be honest don't vary much within the VB program - they will all potentially generate errors, which you should handle appropriately.
I'm not sure what you meant by the "2 different softwares" bit.. generally you need your program and the driver (provider) installed on the client, and the server just contains the database.
-
Jan 9th, 2007, 02:39 PM
#3
Thread Starter
Fanatic Member
Re: Client / Server Database application
Thanks.
U mean that i will install my software on each client pc, and install SQL Server on the Server PC??
what is .CursorLocation=adUseClient or .CursorLocation=adUseServer
Why we use this ?
-
Jan 9th, 2007, 02:56 PM
#4
Re: Client / Server Database application
 Originally Posted by hafizfarooq
Thanks.
U mean that i will install my software on each client pc, and install SQL Server on the Server PC??
Yes. 
what is .CursorLocation=adUseClient or .CursorLocation=adUseServer
Why we use this ?
That determines where the data for your recordset is stored (while you have the recordset object variable open in your code).
For SQL Server it is more efficient to keep it on the server (as there tends to be much less data sent over the network, and lower memory usage on the client), but it does limit the functionality of ADO slightly (for example, RecordCount is not accurate - but you usually dont need it anyway).
-
Jan 9th, 2007, 04:18 PM
#5
Thread Starter
Fanatic Member
Re: Client / Server Database application
Thanks again. Do u know any site or free download able book on this matter ?
-
Jan 9th, 2007, 04:29 PM
#6
Re: Client / Server Database application
I dont use books myself, all I use is VB's help for ADO (an online version).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|