Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Access Project i konekcija na MSSQL

[es] :: Access :: Access Project i konekcija na MSSQL

[ Pregleda: 3278 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

DarkMan
Darko Matesic

Član broj: 20445
Poruke: 572
*.metrohive.neobee.net.

Jabber: DarkMan


Profil

icon Access Project i konekcija na MSSQL02.11.2004. u 12:22 - pre 236 meseci
Da li je moguce totalno ukloniti konekciju ka bazi u ADP fajlu a konekciju ka bazi uspostaviti tek po ucitavanju prve forme ?
Hteo bih na ovaj nacin da izbegnem pristup tabelama ako neko sa shiftom otvori ADP fajl i onda ima pristup tabelama.
 
Odgovor na temu

DarkMan
Darko Matesic

Član broj: 20445
Poruke: 572
*.metrohive.neobee.net.

Jabber: DarkMan


Profil

icon Re: Access Project i konekcija na MSSQL02.11.2004. u 12:47 - pre 236 meseci
Resenje sam nasao na http://www.kbalertz.com/kb_884457.aspx

Uglavnom kada izvrsim ovo konekcija nestaje:
Code:

Function MakeADPConnectionless()
'------------------------------------------------------------
'This code removes the connection properties from the
'Access Project for troubleshooting purposes.
'The ADP opens in a disconnected state until new connection
'properties are supplied.
'------------------------------------------------------------
    Application.CurrentProject.OpenConnection ""
End Function
 
Odgovor na temu

Zidar
Canada

Moderator
Član broj: 15387
Poruke: 3085
*.eqao.com.



+79 Profil

icon Re: Access Project i konekcija na MSSQL03.11.2004. u 18:12 - pre 236 meseci
Ne radim mnogo sa ADP pa ne umem da procenim vaznost, ali ovo mi deluje jako interesantno. Da li da izdvojimo ovo na Top ili da stavimo u Bazu Znanja?
 
Odgovor na temu

Simke
Marko Simic
Sandfield Associates (Solution
Developer)
Novi Zeland

Član broj: 1158
Poruke: 751
*.dialup.xtra.co.nz.

ICQ: 71578686
Sajt: www.sandfield.co.nz


Profil

icon Re: Access Project i konekcija na MSSQL04.11.2004. u 04:59 - pre 236 meseci
Postavljeno u bazu znanja.
All beer is good. Some beer is better.
 
Odgovor na temu

DarkMan
Darko Matesic

Član broj: 20445
Poruke: 572
*.metrohive.neobee.net.

Jabber: DarkMan


Profil

icon Re: Access Project i konekcija na MSSQL04.11.2004. u 10:55 - pre 236 meseci
Nasao sam i resenje za iskljucivanje shifta u ADP-u. Razlikuje se od MDB-a po tome sto se drugacije koriste property-ji. Napisao sam ovaj modul za baratanje property-jima i sadrzi funkciju koja ukljucuje/iskljucuje shift taster.
Code:

Option Compare Database
Option Explicit

Function PropertyExists(PropertyName As String) As Boolean
    On Error GoTo PropertyExists_Error
    PropertyExists = False
    If Application.CurrentProject.Properties(PropertyName).Name <> PropertyName Then GoTo PropertyExists_Error
    PropertyExists = True
PropertyExists_Error:
End Function

Function GetPropertyValue(PropertyName As String, Default As Variant) As Variant
    On Error GoTo GetPropertyValue_Error
    GetPropertyValue = Default
    If PropertyExists(PropertyName) Then GetPropertyValue = Application.CurrentProject.Properties(PropertyName).Value
GetPropertyValue_Error:
End Function

Function SetPropertyValue(PropertyName As String, Value As Variant) As Boolean
    On Error GoTo SetPropertyValue_Error
    SetPropertyValue = False
    If PropertyExists(PropertyName) Then
        Application.CurrentProject.Properties(PropertyName).Value = Value
        SetPropertyValue = True
    Else
        Application.CurrentProject.Properties.Add PropertyName, Value
        SetPropertyValue = True
    End If
SetPropertyValue_Error:
End Function

Function RemoveProperty(PropertyName As String) As Boolean
    On Error GoTo RemoveProperty_Error
    RemoveProperty = False
    If PropertyExists(PropertyName) Then Application.CurrentProject.Properties.Remove PropertyName
    RemoveProperty = True
RemoveProperty_Error:
End Function

Function IsShiftKeyEnabled() As Boolean
    IsShiftKeyEnabled = Not PropertyExists("AllowBypassKey")
End Function

Function EnableShiftKey(Enable As Boolean) As Boolean
    Dim PropertyName As String
    PropertyName = "AllowBypassKey"
    If Not Enable And Not PropertyExists(PropertyName) Then SetPropertyValue PropertyName, 0
    If Enable And PropertyExists(PropertyName) Then RemoveProperty PropertyName
    EnableShiftKey = IsShiftKeyEnabled
End Function

Iako ove funkcije za propertije mogu da rade i u MDB-u, iskljucivanje/ukljucivanje shifra sa ovim kodom ne funkcionise u MDB-u jer se u MDB-u ne koriste Application.CurrentProject.Properties vec CurrentDb.Properties.
 
Odgovor na temu

[es] :: Access :: Access Project i konekcija na MSSQL

[ Pregleda: 3278 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.