PDA

Click to See Complete Forum and Search --> : Newbie DB Questions


carolyn
Feb 8th, 2000, 06:47 AM
I'm using VB5 SP3 on Win95/NT connecting to PostgreSQL V6.4x via ODBC.

There are certain application functions that can be access by users of different group. So I need advices on the following:

1. Is it better to create different users of different groups on database level or create a table containing these security information?

2. Certains fields in a table can be updated by super users but read-only or hided from normal users. So is it better to update the database from VB or by calling database functions/store procedures?

3. How do you call stored procedures from VB? I can't find related info anywhere.

TIA.

carolyn

Bigley
Feb 8th, 2000, 07:03 AM
In response to 1 and 2
There are a number of considerations when deciding where the work should be done, if you have a server based database then you must weigh up the options of increased network traffic versus presumably a faster machine(your server).
In response to 3
If you are using ADO
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

cn.Open "<DataSource>" 'eg "DSN=Pubs"
cn.CursorLocation = adUseClient

rs.Open "<Stored Procedure Name>", cn
Set rs.ActiveConnection = Nothing
cn.Close
Set cn = Nothing