線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1146
推到 Plurk!
推到 Facebook!

infomix sql command

尚未結案
jumo
一般會員


發表:33
回覆:65
積分:24
註冊:2002-04-17

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-06-24 11:01:51 IP:61.218.xxx.xxx 未訂閱
我目前要讀取 infomix 資料庫, sql 指令如下 select * from server1:table1 a, server2:table2 b where (a.field1 = b.field2) 但是我不管用 ADO 或 BDE 的資料庫元件, 都無法執行這到指令, 都會出現一個 unknow type 的錯誤訊息, 不過我用 Sql Explorer 卻能正確執行, 請問這要如何解呢?
scotthsiao
高階會員


發表:13
回覆:324
積分:147
註冊:2005-02-01

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-06-24 11:53:37 IP:211.21.xxx.xxx 未訂閱
您好, 試試把 Query 的 ParamCheck 設成 false ,看有沒有用 ?
jumo
一般會員


發表:33
回覆:65
積分:24
註冊:2002-04-17

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-06-24 17:00:23 IP:61.218.xxx.xxx 未訂閱
我將 ParamCheck 設成 false 之後, 已經可以確實的執行了, 不過查詢的速度卻很慢, 不知改變這個參數的作用和影響的東西有哪些??
scotthsiao
高階會員


發表:13
回覆:324
積分:147
註冊:2005-02-01

發送簡訊給我
#4 引用回覆 回覆 發表時間:2005-06-24 17:33:17 IP:210.66.xxx.xxx 未訂閱
應該和效率無關,只是略過 paramater 的檢查而已,以下是原文說明  
引言: Description Set ParamCheck to specify whether or not the Parameters property is initialized using ":Param" style parameters in an SQL statement specified in the CommandText property. If the SQL statement in CommandText only contains "?" style parameters, the Parameters property will only be initialized if the OLE DB provider returns parameter information for an SQL command. Otherwise, the parameters must be explicitly created using the CreateParameter method (TParameters). When ParamCheck is true, a parameter is generated for each ":Param" style parameter in the SQL statement. The default value of ParamCheck is true. This property is useful for data definition language (DDL) statements that contain parameters as part of the DDL statement and that are not parameters for the ADO command component. For example, the DDL statement to create a stored procedure may contain parameter statements that are part of the stored procedure. Set ParamCheck to false to prevent these parameters from being mistaken for parameters of the ADO command component executing the DDL statement.
jumo
一般會員


發表:33
回覆:65
積分:24
註冊:2002-04-17

發送簡訊給我
#5 引用回覆 回覆 發表時間:2005-06-25 09:11:00 IP:219.80.xxx.xxx 未訂閱
謝謝您的幫忙 
系統時間:2024-06-26 23:40:56
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!