🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.database
1 messages
1 total messages Started by �� Sun, 30 Nov 1997 00:00
pb5.0���!
#10775
Author: ��
Date: Sun, 30 Nov 1997 00:00
40 lines
3539 bytes
��λǰ�����֣�
    ������ʹ��powerbuilderʱ������һ�������⡣
    ��̨Ϊ:WinNT+Sybase11.1(server)
    ǰ̨Ϊ:Win95+Sybase11.1(client)+powerbuilder5.0
    ������server��sybase�ϱ�д��һ�洢��̣�stored procedure����
��Ϊ"joinwith",�Ȱ�ijЩ��ݷŵ�һ��ʱ���У��� select a, b, c  
into  #temp1  from.... ��䣩���ٰ�ijЩ��ݷŵ���һ��ʱ���У���
 select  x, y, z  into  #temp2  from.... ��䣩������������
ʱ�������������� select  b, c, y, z  from  #temp1, #temp2  
where #temp1.a=#temp2.x ��䣩��
     Ȼ����powerbuilder�Ͻ���һ����ݴ���(datawindow)����Ϊ
"d_store"����"data source"��ѡ��"stored procedure"�����Ϊ
'grid'����"OK"��ѡ��洢���"joinwith"�����һ��ݴ��ں�
ʹ��"preview"�鿴,��ݴ�ȡ�ɹ������������ȷ��
     ��������ڣ���ʹ�ñ��˱�д��Ӧ�ó���ʱ������ȡ���ڱ��˵�Ӧ
�ó����У��Ƚ�����sybase�����ӣ������������(transaction)SQLCAΪ��
     SQLCA.DBMS="SYC"
     SQLCA.database="testdb"
     SQLCA.LogID="sa"
     SQLCA.LogPass="***"
     SQLCA.ServerName="wenn"
��server��������ȷ��Ȼ���һ���ڣ�������һ��ݴ���(dw_1)����һ
��ť(cb_1)����ݴ����ڴ��ڴ�ʱ���Ѿ���������������� 
dw_1.settransobject(sqlca)��䣩����ʹ������ݴ��ڶ���"d_store"
���ӣ��� dw_1.dataobject="d_store" ��䣩����ť���ڼ�����ݣ���
"clicked"�¼�(event)Ϊ��dw_1.retrieve()�������б��˵�Ӧ�ó���ʱ��
��������ڣ�������cb_1ʱ����ʾ"datawindow error"��Ϣ��
SELECT INTO command not allowed within multi-statement transaction.
     ���ʹ��"joinwith"����洢��̣�������û��"select into"��
��Ĵ洢��̣��Ϳ����ñ��˵�Ӧ�ó�����ȷȡ��֤����Ӧ�ó���ű���д
��ȷ�������ೢ�԰�"joinwith"��Ϊ���Ȳ���һ��ʱ�?��create table 
#temp1.... ��䣩���ٰ�һЩ��ݲ�����У��� insert into #temp1....
��䣩������ͬ��������Ӧ�ó���ʱ��ʾ"datawindow error"��Ϣ��
CREATE command not allowed within multi-statement transaction.
     �Ƿ��������������Ӧ�������transcation������Ӧ����α�д
�洢���"joinwith"�����߿ɷ��ṩ��ȡ���ѯ�ĵط���
     Thanks a lot��
--
�� ��Դ:����ˮ˼Դվ bbs.sjtu.edu.cn��[FROM: www]
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