Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Глобальная переменная ? / 8 сообщений из 8, страница 1 из 1
21.11.2003, 18:28
    #32331878
avkv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
Всем привет!
Есть проблемка.
я в своей програме организовал собственную систему доступа.
Когда пользователь входит он вводит логин и я его запоминаю через глобальную переменную.
При запуске форм я проверяю логин в глобальной пременной и определяю права на доступ.
Проблема в том что и иногда теряется глобальная переменная?
Кто знает какие есть варианты запомнить логин.?
Програма под XP на SQL.
...
Рейтинг: 0 / 0
21.11.2003, 18:50
    #32331901
sasha_1
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
извини, а чем тебе таблицы не нравятся?
...
Рейтинг: 0 / 0
21.11.2003, 19:08
    #32331918
АлексейК
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
в реестре
в текстовом файле
в пользовательском свойстве таблицы MDB
в пользовательском свойстве проекта ADP
...
Рейтинг: 0 / 0
21.11.2003, 19:12
    #32331924
avkv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
Как сохранить в пользовательском свойстве(пример)
и как в реестре(пример)
...
Рейтинг: 0 / 0
21.11.2003, 19:20
    #32331929
АлексейК
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
Public Sub setperiod(data As Date)
Dim prp As Property
CurrentProject.Properties("firstdate") = firstdate(data)
CurrentProject.Properties("lastdate") = lastdate(data)
'CurrentProject.Properties.Add "lastdate", data ' так создают
End Sub


Public Function gfd()
'get first date
gfd = CDate(CurrentProject.Properties("firstdate"))
End Function

Public Function Gld()
'get last date
Gld = CDate(CurrentProject.Properties("lastdate"))
End Function
...
Рейтинг: 0 / 0
21.11.2003, 19:23
    #32331930
АлексейК
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
GetSetting Function


Returns a key setting value from an application's entry in the Windows registry or (on the Macintosh) information in the application’s initialization file.

Syntax

GetSetting(appname, section, key[, default])

The GetSetting function syntax has these named arguments:

Part Description
appname Required. String expression containing the name of the application or project whose key setting is requested. On the Macintosh, this is the filename of the initialization file in the Preferences folder in the System folder.
section Required. String expression containing the name of the section where the key setting is found.
key Required. String expression containing the name of the key setting to return.
default Optional. Expression containing the value to return if no value is set in the key setting. If omitted, default is assumed to be a zero-length string ("").



Remarks

If any of the items named in the GetSetting arguments do not exist, GetSetting returns the value of default.

-----------------------------

SaveSetting Statement


Saves or creates an application entry in the application's entry in the Windows registry or (on the Macintosh) information in the application’s initialization file.

Syntax

SaveSetting appname, section, key, setting

The SaveSetting statement syntax has these named arguments:

Part Description
appname Required. String expression containing the name of the application or project to which the setting applies. On the Macintosh, this is the filename of the initialization file in the Preferences folder in the System folder.
section Required. String expression containing the name of the section where the key setting is being saved.
key Required. String expression containing the name of the key setting being saved.
setting Required. Expression containing the value that key is being set to.



Remarks

An error occurs if the key setting can’t be saved for any reason.
...
Рейтинг: 0 / 0
21.11.2003, 19:28
    #32331932
avkv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
Спасибо попробую!
...
Рейтинг: 0 / 0
21.11.2003, 19:29
    #32331933
АлексейК
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Глобальная переменная ?
пожайлуста
...
Рейтинг: 0 / 0
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Глобальная переменная ? / 8 сообщений из 8, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]