Results 1 to 14 of 14

Thread: Datareader through the network ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325

    Datareader through the network ?

    I'm working on a network database project. I have a server where the DB is located, and the clients that gain access to the database through an authentication program.
    Let's suppose client 1 makes this SQL query: "SELECT * FROM table", so client 1 sends this data to the auth program:
    "I'm client 1, please execute this query: SELECT * FROM table"
    Auth program executes query. Here's I need assistance: How can I pass back to client 1 then datareader object returned from query? Do I have to send all fields, one by one??!?

    Thx
    Xmas
    Learn, this is the Keyword...

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Instead of passing a datareader, why don't you put the results in a dataset and return that?

    Then, it is disconnected from the DB and you only have to pass one object.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    DataRead object retrieve data from source db record at a time .

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Ok, let's suppose I put all data into a dataset object. How can I send it?
    Learn, this is the Keyword...

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Post some code plz ?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Some code? Code is what I'm looking for
    Learn, this is the Keyword...

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    How do you want to send it? Via a webpage? An application?

    You can use remoting if you want. SQL can do all that for you also, no need for an authentication program you can use windows or SQL logons.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    I know that SQL can do that, but how to do transactions logs, and other security related stuffs? Via an auth program I can do all that, but maybe I've to implement how to send records to clients... Am I wrong?
    Learn, this is the Keyword...

  9. #9
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Well I don't know what your whole project is or why you would use an outside program to authenticate the users instead of windows or SQL it seems sort of like reinventing the wheel.

    All of that can be handled in the connection string of a SQLConnection object can't it? What is the client? Is it a client application?

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Yes, it is a simple client application.
    Learn, this is the Keyword...

  11. #11
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    What kind of database is this? Where is it located? Do you want to know how to do this using ADO.NET or some other way?

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Let's explain again.

    I have a server, the database is there. It is a MS Access database (.mdb). I have to log EVERY transaction, query, connection and so on... How can I do with SQL??!? I thought I need an application. So in the server there is a Server application that provides DB access and network functionality. From the other side of the world there is a client application, that connects to the server program in order to gain access to the database. Now let's suppose the client sends a query like this "SELECT * FROM mytable": Server application must do this query and send to the client the data it requested. This is my problem. How can I send the result of a query? Do I have to send it field by field or there is another method?
    Learn, this is the Keyword...

  13. #13
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Ok well that is exactly what SQL Server does, but are you trying to use this as a generic DB engine sort of thing? Do you plan on using this over the internet or just a network? If its just a network then the clients can connect to the access database and do this. If this is for an application then the application can handle all the recording who, when and what not.

    If you are making some sort of layer then and decide not to directly connect to the database then I would suggest using remoting. Here you would have a getDataset method that you pass the user info and the query to and then the method returns the data in disconnected form as a dataset.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    What is remoting? is an object? How can I use it? a piece of code just to make me start?

    Thx!
    Learn, this is the Keyword...

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