亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 6049 | 回復: 5
打印 上一主題 下一主題

pb數據管道問題求解。。 [復制鏈接]

論壇徽章:
0
跳轉到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2006-12-27 08:55 |只看該作者 |倒序瀏覽
小弟剛開始接觸pb,遇到一個數據管道的問題,執(zhí)行管道后返回的結果老是 -1
以下是部分代碼,pb8寫的,請高手幫忙!謝謝!!

forward
global type w_pipeline from window
end type
type st_4 from statictext within w_pipeline
end type
type st_3 from statictext within w_pipeline
end type
type st_2 from statictext within w_pipeline
end type
type st_1 from statictext within w_pipeline
end type
type cb_exit from commandbutton within w_pipeline
end type
type cb_cancel from commandbutton within w_pipeline
end type
type cb_run from commandbutton within w_pipeline
end type
type dw_error from datawindow within w_pipeline
end type
type st_error from statictext within w_pipeline
end type
type st_written from statictext within w_pipeline
end type
type st_read from statictext within w_pipeline
end type
type st_connect from statictext within w_pipeline
end type
end forward

global type w_pipeline from window
integer width = 2528
integer height = 1044
boolean titlebar = true
string title = "DU---dmÊý¾Ýµ¼Èë"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
st_4 st_4
st_3 st_3
st_2 st_2
st_1 st_1
cb_exit cb_exit
cb_cancel cb_cancel
cb_run cb_run
dw_error dw_error
st_error st_error
st_written st_written
st_read st_read
st_connect st_connect
end type
global w_pipeline w_pipeline

type variables
transaction trn_src
transaction trn_desc
//u_pipeline_student iu_pipeline
u_pipeline_student iu_pipeline
end variables

on w_pipeline.create
this.st_4=create st_4
this.st_3=create st_3
this.st_2=create st_2
this.st_1=create st_1
this.cb_exit=create cb_exit
this.cb_cancel=create cb_cancel
this.cb_run=create cb_run
this.dw_error=create dw_error
this.st_error=create st_error
this.st_written=create st_written
this.st_read=create st_read
this.st_connect=create st_connect
this.Control[]={this.st_4,&
this.st_3,&
this.st_2,&
this.st_1,&
this.cb_exit,&
this.cb_cancel,&
this.cb_run,&
this.dw_error,&
this.st_error,&
this.st_written,&
this.st_read,&
this.st_connect}
end on

on w_pipeline.destroy
destroy(this.st_4)
destroy(this.st_3)
destroy(this.st_2)
destroy(this.st_1)
destroy(this.cb_exit)
destroy(this.cb_cancel)
destroy(this.cb_run)
destroy(this.dw_error)
destroy(this.st_error)
destroy(this.st_written)
destroy(this.st_read)
destroy(this.st_connect)
end on

event open;//u_pipeline_student iu_pipeline
trn_src = create transaction

// Profile dm
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=Excel Files;UID=WD='"

connect;// using trn_desc;

if trn_src.sqlcode <> 0 then
        st_connect.text = string(trn_src.sqlcode)+"&Ocirc;&acute;&Ecirc;&yacute;&frac34;&Yacute;&iquest;&acirc;&Aacute;&not;&frac12;&Oacute;&Ecirc;§°&Uuml;&pound;&iexcl;"
        return;
end if

trn_desc = create transaction

// Profile store111
SQLCA.DBMS = "SYC Adaptive Server Enterprise"
SQLCA.ServerName = "store111"
SQLCA.database="store111"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""

connect;// using trn_src;


if trn_src.sqlcode <> 0 then
        st_connect.text = string(trn_desc.sqlcode)+"&Auml;&iquest;±ê&Ecirc;&yacute;&frac34;&Yacute;&iquest;&acirc;&Aacute;&not;&frac12;&Oacute;&Ecirc;§°&Uuml;&pound;&iexcl;"
        return;
else
        st_connect.text = "&Ecirc;&yacute;&frac34;&Yacute;&iquest;&acirc;&Aacute;&not;&frac12;&Oacute;&sup3;&Eacute;&sup1;&brvbar;&pound;&iexcl;"
end if

st_read.text = "0"
st_written.text = "0"
st_error.text = "0"

//iu_pipeline=create u_pipeline_student
//iu_pipeline.dataobject="pipe_student"

end event
event close;destroy iu_pipeline
disconnect using trn_src;
destroy trn_src
disconnect using trn_desc;
destroy trn_desc
end event

type st_4 from statictext within w_pipeline
integer x = 882
integer y = 64
integer width = 841
integer height = 84
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "&sup3;&ouml;&acute;í&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;&frac14;°&sup3;&ouml;&acute;í&Auml;&Uacute;&Egrave;&Yacute;"
boolean focusrectangle = false
end type

type st_3 from statictext within w_pipeline
integer x = 105
integer y = 576
integer width = 457
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long backcolor = 67108864
string text = "&ETH;&acute;&Egrave;&euml;&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;"
boolean focusrectangle = false
end type

type st_2 from statictext within w_pipeline
integer x = 105
integer y = 320
integer width = 457
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "&para;&Aacute;&Egrave;&euml;&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;"
boolean focusrectangle = false
end type

type st_1 from statictext within w_pipeline
integer x = 96
integer y = 64
integer width = 526
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long backcolor = 67108864
string text = "&Ecirc;&yacute;&frac34;&Yacute;&iquest;&acirc;&Aacute;&not;&frac12;&Oacute;×&acute;&Igrave;&not;"
boolean focusrectangle = false
end type

type cb_exit from commandbutton within w_pipeline
integer x = 1915
integer y = 600
integer width = 457
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "&Iacute;&AElig;&sup3;&ouml;"
end type

event clicked;close(parent)
end event

type cb_cancel from commandbutton within w_pipeline
integer x = 1906
integer y = 360
integer width = 457
integer height = 128
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "&Ouml;&Otilde;&Ouml;&sup1;"
end type

event clicked;long ll_flag
ll_flag = iu_pipeline.cancel()
if ll_flag = 1 then
        messagebox("&Igrave;á&Ecirc;&frac34;","&Ecirc;&yacute;&frac34;&Yacute;&sup1;&Uuml;&micro;&Agrave;&Ouml;&acute;&ETH;&ETH;±&raquo;&Ouml;&Otilde;&Ouml;&sup1;&sup3;&Eacute;&sup1;&brvbar;&pound;&iexcl;"
else
        messagebox("&Igrave;á&Ecirc;&frac34;","&Ecirc;&yacute;&frac34;&Yacute;&sup1;&Uuml;&micro;&Agrave;&Ouml;&acute;&ETH;&ETH;&Ouml;&Otilde;&Ouml;&sup1;&Ecirc;§°&Uuml;&pound;&iexcl;"
end if

end event

type cb_run from commandbutton within w_pipeline
integer x = 1906
integer y = 124
integer width = 457
integer height = 128
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "&Ocirc;&Euml;&ETH;&ETH;"
end type

event clicked;long ll_flag
string ls_return
//u_pipeline_student iu_pipeline
//iu_pipeline=create u_pipeline_student
//iu_pipeline.dataobject = "pipe_student"

iu_pipeline = Create u_pipeline_student

iu_pipeline.ist_read = st_read
iu_pipeline.ist_written = st_written
iu_pipeline.ist_error = st_error

iu_pipeline.DataObject = 'pipe_student'

//iu_pipeline.Start(trn_src,trn_desc,dw_error)
ll_flag = iu_pipeline.Start(trn_src,trn_desc,dw_error)
if ll_flag <> 1 then
        st_error.text = "&Ecirc;&yacute;&frac34;&Yacute;&sup1;&Uuml;&micro;&Agrave;&acute;ò&iquest;&ordf;&acute;í&Icirc;ó&pound;&not;&acute;í&Icirc;ó&acute;ú&Acirc;&euml;&Icirc;&ordf;&pound;&ordm;"+string(ll_flag)
        return;
//else st_error.text="&Ecirc;&yacute;&frac34;&Yacute;&acute;&laquo;&Euml;&Iacute;&sup3;&Eacute;&sup1;&brvbar;&pound;&iexcl;"
end if
//choose case ll_flag
//        case -1
//                ls_return=""
//        case -2
//                ls_return=""
//        case -3
//                ls_return=""
//        case -4
//                ls_return=""
//        case -5
//                ls_return=""
//        case -6
//                ls_return=""
//end choose
end event
type dw_error from datawindow within w_pipeline
integer x = 946
integer y = 432
integer width = 718
integer height = 300
integer taborder = 10
string title = "none"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

type st_error from statictext within w_pipeline
integer x = 896
integer y = 212
integer width = 855
integer height = 336
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 134217857
long backcolor = 67108864
string text = "&sup3;&ouml;&acute;í&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;&frac14;°&sup3;&ouml;&acute;í&Auml;&Uacute;&Egrave;&Yacute;"
boolean focusrectangle = false
end type

type st_written from statictext within w_pipeline
integer x = 105
integer y = 688
integer width = 475
integer height = 88
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 134217857
long backcolor = 67108864
string text = "&ETH;&acute;&Egrave;&euml;&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;"
boolean focusrectangle = false
end type

type st_read from statictext within w_pipeline
integer x = 101
integer y = 412
integer width = 475
integer height = 76
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 134217857
long backcolor = 67108864
string text = "&para;&Aacute;&Egrave;&euml;&Ecirc;&yacute;&frac34;&Yacute;&ETH;&ETH;&Ecirc;&yacute;"
boolean focusrectangle = false
end type

type st_connect from statictext within w_pipeline
integer x = 101
integer y = 172
integer width = 677
integer height = 84
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 134217857
long backcolor = 67108864
string text = "&Ecirc;&yacute;&frac34;&Yacute;&iquest;&acirc;&Aacute;&not;&frac12;&Oacute;×&acute;&Igrave;&not;"
boolean focusrectangle = false
end type

論壇徽章:
0
2 [報告]
發(fā)表于 2006-12-27 15:43 |只看該作者
.Start是-1的話,是Pipe open failed

論壇徽章:
0
3 [報告]
發(fā)表于 2007-07-12 14:49 |只看該作者
為什么是打開失敗啊,能不能說說是什么地方有問題啊,謝了

論壇徽章:
0
4 [報告]
發(fā)表于 2007-07-14 17:22 |只看該作者
請大家?guī)蛶臀,非常感謝,為此事弄得我郁悶的,拜托了

論壇徽章:
0
5 [報告]
發(fā)表于 2007-07-18 14:28 |只看該作者

回復 #4 pandu 的帖子

請在程序中使用調試的方法確認以下的內容

1. 程序中的數據庫連接是否成功
2. datawindow object是否正常

論壇徽章:
17
處女座
日期:2013-08-27 09:59:352015亞冠之柏太陽神
日期:2015-07-30 10:16:402015亞冠之薩濟拖拉機
日期:2015-07-29 18:58:182015年亞洲杯之巴勒斯坦
日期:2015-03-06 17:38:17摩羯座
日期:2014-12-11 21:31:34戌狗
日期:2014-07-20 20:57:32子鼠
日期:2014-05-15 16:25:21亥豬
日期:2014-02-11 17:32:05丑牛
日期:2014-01-20 15:45:51丑牛
日期:2013-10-22 11:12:56雙子座
日期:2013-10-18 16:28:17白羊座
日期:2013-10-18 10:50:45
6 [報告]
發(fā)表于 2007-07-18 14:43 |只看該作者
兄弟你搞的太離譜了。
trn_src = create transaction

// Profile dm
trn_src.DBMS = "ODBC"
trn_src.AutoCommit = False
trn_src .DBParm = "ConnectString='DSN=Excel Files;UID=WD='"

connect using trn_src;

if trn_src.sqlcode <> 0 then
        st_connect.text = string(trn_src.sqlcode)+"Ô´Êý¾Ý¿âÁ¬½Óʧ°Ü£¡"
        return;
end if

trn_desc = create transaction

// Profile store111
trn_desc .DBMS = "SYC Adaptive Server Enterprise"
trn_desc .ServerName = "store111"
trn_desc .database="store111"
trn_desc .LogId = "sa"
trn_desc .AutoCommit = False
trn_desc .DBParm = ""

connect using trn_desc;

這樣子才是對的。你src和dst都使用默認的SQLCA怎么可能對呢。搞搞清楚。SQLCA是默認的全局transaction,而你實際定義的別兩個transaction自己卻沒用上。

[ 本帖最后由 myworkstation 于 2007-7-18 14:44 編輯 ]
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術有限公司. 版權所有 京ICP備16024965號-6 北京市公安局海淀分局網監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯網協會會員  聯系我們:huangweiwei@itpub.net
感謝所有關心和支持過ChinaUnix的朋友們 轉載本站內容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP