Click to See Complete Forum and Search --> : Datareader through the network ?
Xmas79
Jan 27th, 2003, 08:08 AM
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
hellswraith
Jan 27th, 2003, 11:25 AM
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.
Pirate
Jan 27th, 2003, 11:49 AM
DataRead object retrieve data from source db record at a time .
Xmas79
Jan 27th, 2003, 02:55 PM
Ok, let's suppose I put all data into a dataset object. How can I send it?
Pirate
Jan 27th, 2003, 03:39 PM
Post some code plz ?
Xmas79
Jan 27th, 2003, 03:59 PM
Some code? Code is what I'm looking for :D:D:D
Edneeis
Jan 27th, 2003, 04:12 PM
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.
Xmas79
Jan 27th, 2003, 04:32 PM
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?
Edneeis
Jan 27th, 2003, 04:52 PM
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?
Xmas79
Jan 28th, 2003, 09:55 AM
Yes, it is a simple client application.
Edneeis
Jan 28th, 2003, 10:20 AM
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?
Xmas79
Jan 28th, 2003, 10:46 AM
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?
Edneeis
Jan 28th, 2003, 11:40 AM
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.
Xmas79
Jan 28th, 2003, 11:46 AM
What is remoting? is an object? How can I use it? a piece of code just to make me start?
Thx!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.