Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Whats bad about Visual Foxpro
Message
 
 
À
17/07/2001 16:10:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00530878
Message ID:
00531726
Vues:
26
>I've lost you there. If I'm running this app under NT/2000, and ADSI is installed (it is in 2000 and can be added to NT easily if not already there) then, with the proper permissions the app could check that the current user is member of a certain group before allowing access to the DBC. Isn't this basically sound?
>
>
><>Only one problem: With no objects and no DECLARE - DLL supported by the provider, how you gonna do that?

Try it for yourself if you've got the provider installed (change the path in the GetObject()):
*-- Declare the objects we'll use later, so that
*-- IntelliSense can be used

LOCAL oCat As adox.catalog
LOCAL oTable As Adox.table
LOCAL oConn As Adodb.connection
LOCAL oRs As Adodb.recordset
LOCAL oCmd As Adodb.command

*-- Three ADOX objects are needed:
*-- Catalog - equivalent to a DBC
*--	Connection - Similar to an ODBC connection
*--	Table - equivalent to a DBF
oCat = CREATEOBJECT("adox.catalog")
oConn = CREATEOBJECT("adodb.connection")
oCmd = NEWOBJECT("adodb.command")

*-- Create a catalog using a connection string
*-- Values for Provider could also be:
*-- Vfpoledb.1
*-- Vfpoledb
oConn.ConnectionString = "Provider=Vfpoledb.vfpoledb;Data Source=.\TestDBC.dbc"
oConn.Mode = 16  && adModeShareDenyNone 
oConn.Open 
oCmd.CommandText = "ox=GETOBJECT('WinNT://mydomain/myuser')"
oCmd.ActiveConnection = oConn 
oCmd.Execute
oCmd.CommandText = "ox.visible = .t."
oCmd.Execute
Mike Stewart
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform