做了一個datasnap 服務器和客戶端, windows10+ xe7
服務器端 使用MYSQL+FDCONNECTION+FDQUERY+DSP
客戶端使用sqlconnection+dspconnection+clientdataset+datasource+dbgrid顯示。
服務端的fdconnection的connectionstring, fdquery的sql(select * from tbuser) 都按照默認設定的啊
問題是客戶端的form創立顯示時,顯示 如題的402錯誤,什么the operation cannot be performed without assign the selectcommand.
客戶端的clientdatase的commandtext是select * from tbuser, 反復檢查了服務端和客戶端
不知道什么原因。
求教高手知道。
uj5u.com熱心網友回復:
好像是MYSQL的驅動有問題服務器端用64位的,客戶端記得也用64位
uj5u.com熱心網友回復:
確定不是mysql的驅動問題,不知道是不是fdconnection什么地方要設定?還是服務端的datamoduleunit里面要設定?uj5u.com熱心網友回復:
客戶端clientdataset的DataSTableName設定為服務器對應的fdquery控制元件名。設計時的clientdataset不要OPEN,在需要的時候再去打開。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/280081.html
標籤:網絡通信/分布式開發