🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by ���ܵ�Сʨ Sat, 18 Apr 1998 00:00
Lotus Notes����������ݿ��һ��ʵ�ַ���
#1272
Author: ���ܵ�Сʨ
Date: Sat, 18 Apr 1998 00:00
117 lines
7725 bytes
 Lotus Notes 4.0��һ���ܺõ�Ⱥ������ƽ̨,���кܺõĵ����ʼ�
ϵͳ,���ȵ�ȫ�ļ����͸��ƹ��ܡ�����м�ǿ�İ�ȫ��ʩ,���Կ�
���ر�֤��Ϣ��ȫ�ԡ������ڽ�����������������Ϲ��ܽ���,��
ʱ����Ҫ��ͳ�Ĺ�ϵ����ݿ����ϵͳ��Э��������ΰ����еĹ�
ϵ����ݿ���Ϣת�Ƶ�Notes��ݿ���,������Notes�������������
�������,���DZ���Ҫ���۵����⡣������Foxpro��ݿ�Ϊ��,����Lo
tus Notes����������ݿ��һ��ʵ�ַ�����

    Lotus Notes����������ݿ��;��
    Lotus Notesʹ��ODBC��׼��ȡ������ݿ���Ϣ��ͨ��Notes����
Ƕ�Ĺ�ʽ��Script����,����Notes�ĵ��������Notes��ݿ���Ϣ,��
�ֳɵ����ת����Notes��ݿ⡣Notes�ṩ���·�������ȡ�ⲿ���
:

    ��Notes��ʽ������@Db����
    Notes�ṩ@DbColumn��@DbLookup��@DbCommand�������,�����
����ĵ�һ��������" ODBC",�Ϳɷ���������ݿ���Ϣ��������һ��
ȱ��:ֻ�ܰ��д�ȡ��Ϣ,���ܰ���¼��ȡ��Ϣ��

    ����Lotus Script��ݶ���
    LSX����ģ��ʹ��Lotus Script��������д��ȡ�ⲿ��ݵĺ���,
Notes��ODBCConnecti on��ODBCQuery��ODBCResultSet�����ΪNote
s�ṩ����ODBC��׼��ȡ������ݿ�����ԺͲ�����
    �ڴ�ȡ�ⲿ���֮ǰ,���붨��һ�����Դ,�Ա���ODBC�����
������֪�������ȡ��ݡ�һ�����Դ��һ���ض���ODBC������
Ҫ��ȡ�������ϵ��һ��,������Ҫ��ȡ�����,�����������Ŀ¼��
��̨DBMS�Լ�����ƽ̨����ϵ,��Щ��Ϣ����¼��һ��ע���ļ���( 
��Winows95����ODBC.INI),�ɲ���Windows�Ĺ��?��ע�����Դ��
��Windows95�����������:
    1.��Windows�������,��ODBCͼ��,��Add��ť; 
    2.ѡ����Ҫ�������,��OK��ť;

    3.�������Դ��ơ�������Ϣ�Լ�����Ҫ��������Ϣ; 
    4.��Щ�������Ҫ����һЩ��Ϣ,������Щ�������Ϣ,����
OK��ť; 
    5.��Close��ť��

    Lotus Notes����Foxpro��һ��ʵ�ַ���
    ʵ��Notes����Foxpro��ݿ�Ļ���˼����:��Foxpro��һ��
��ݿ�,����ṹ��Ӧ����Notes��ݿ��ィ��һ��ͬ��ṹ�ı?,
�Ա��Foxpro�ֶε���Ϣ��ת�������Notes �?��Ӧ�ֶ���;����
һ������,��Script���Ա�дת������;�ٴ���һ����ͼ�����������
,��ʵ��������ݿ���Ϣ��Notes��ݿ�ת����
    ����һ��Foxpro��ݿ�BMZBK.DBF,��ṹ����:
    �ֶ���   ����       ���   ˵��
    code     Character   7     ָ�����
    name     Character   40    ָ�����
    fullname Character   60    ָ��ȫ��
    unit     Character   12    ������λ
    ��������������Ϣת����Notes���е�ʵ�ֲ�������: 
    1.��Notes���½�һ����ݿ�,ȡ��ΪConvert.nsf,�������ݿ�
�ﴴ��һ���?,ȡ��Ϊcodelib,����������:
    ����          ����       ˵��
    code          �ı��ɱ༭ ָ�����
    name          �ı��ɱ༭ ָ�����
    fullname      �ı��ɱ༭ ָ��ȫ��
    unit          �ı��ɱ༭ ������λ
    ��Convert.nsf���н���һ������,ȡ��Ϊvfpagent,��������:
    ���д˴����ʱ���趨Ϊ:�˹�ѡ��"����"�˵�ִ��;
    ָ������������ĵ��趨Ϊ:��ͼ�������ĵ���
    2.�˴���Ҫִ�еIJ���,��Script��д�����¼�:
    (1)Option�¼������±��:
    Option Public
    Uselsx"*LSXODBC"  ����ȡODBC����ȫ�ֶ���
    (2)Initialize�¼������±��:
    Sub Initialize
      Dim session As New Notessession
      Dim db As Notesdatabase
      Dim doc As notesdocument
      Set db=session.currentdatabase
      Set doc=New notesdocument(db)
      doc.form="codelib"
      Dim conn As New ODBCConnection
      Dim qry As ODBCQuery
      Dim result As ODBCResultSet
      Call conn.Disconnect()
      Set qry=New ODBCQuery
      Set result=New ODBCResultSet
      'VFR��ODBC��ע��õ����Դ
      If conn.ConnectTo("VFP")Then
       Set qry.Connection=conn
       qry.SQL="SELECT*fromBMZBK" '���Ͳ�ѯ����
       Set result.Query=qry
       Call result.Execute()
       columns=result.Columns
      'ȡ�����,������Notes��Ӧ���ֶ���
       Do Until result.IsEndOfData
     doc.code=Trim$(result.getvalue(1))
     doc.name=Trim$(result.getvalue(2))
     doc.fullname=Trim$(result.getvalue(3))
     doc.unit=Trim$(result.getvalue(4))
     Call doc.save(True,True)
     Set db=session.currentdatabase
     Set doc=New notesdocument(db)
     doc.form="codelib"
     Call result.nextrow()
       Loop
     Call conn.Disconnect() �������Դ�Ͽ�����
     Else
    Messagebox("Could not connect to server")
     End If
    End Sub

    3.��Convert.nsf���н���һ����ͼ,ȡ��ΪDemoView,�ڴ���ͼ
�ﴴ��һ������,����Ϊ"ת��",���з�ʽΪ�򵥲���:����"vfpagent
"���?�����ڴ�Convert.nsf��ݿ�ʱ,���DemoView��ͼ,�ͻ���
��Ļ�Ϸ�����"ת��"������ť,��������ť,�Ϳɰ�Foxpr oһ����
�ݿ�BMZBK.DBF��������Ϣת����Notes��ݿ��ˡ�
    ���Ľ��ܵķ������ڻ����ϵ���ͨ��,���л���Ϊ:
    ��������:Window NT 3.51,Lotus Notes Server 4.0,IBM PC Se
rver 320,80M�ڴ档
    �ͻ���:Windows95,Lotus Notes Client 4.0,�𳤳�586PI/90,1
6M�ڴ�

--
�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: hsia.nju.edu.cn]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads