Results 1 to 6 of 6

Thread: Client / Server Database application

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    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:
    1. Set Rs = New ADODB.Recordset
    2. With Rs
    3.         .Open "Select * from Tbl_Class_Reg where Class_Code = '" & TxtCode & "'", dB, adOpenDynamic, adLockOptimistic
    4. 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

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    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 ?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Client / Server Database application

    Quote 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).

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Re: Client / Server Database application

    Thanks again. Do u know any site or free download able book on this matter ?

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    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
  •  



Click Here to Expand Forum to Full Width