乙個小錯誤,浪費兩小時

2022-02-10 07:04:46 字數 943 閱讀 4552

自我感覺真是低效率!這個是個sql語句在access執行的問題,如下:

**string

strsql ="

select top 2000 * from message where receiver='"+

useraccount+"

' and sendtime

datetime.now+"

' and sendtime>'"+

datetime.now.adddays(-1

)+"'

"oledbconnection con 

=new

oledbconnection(

"provider=microsoft.jet.oledb.4.0;data source=c:/chat.mdb

"); 

con.open(); 

oledbdataadapter dataadapter 

=new

oledbdataadapter(strsql,con); 

dataset ds 

=new

dataset(); 

dataadapter.fill(ds); 

con.close();

這段**在dataadapter.fill(ds);的時候一直提示「至少乙個引數沒有被指定值」,又將這段**放到乙個測試頁面走了一遍還是沒有問題的,百思不得其解,於是到網路上查詢,還是得不到解決辦法。哎,無奈自己測試了多次都沒有想到將語句斷點截獲到access中執行,最後才想到這個辦法,這一執行不打緊,還讓輸入datetime值了:

仔細看了語句才知道,原來表中的字段是sendtime,我的查詢語句寫成datetime了,這麼小的錯誤,耽誤了兩個小時,教訓哪。記一下,鞭笞自己。

egit的乙個小錯誤

用egit和堅果雲搭配開發環境,配置egit時提示乙個錯誤 the current branch is not configured for pull.no value for key branch.master.merge found in configuration google一番後發現原來是...

ntp的乙個小錯誤

root localhost ntpdate 10.128.14.25 3 apr 21 05 05 ntpdate 1506 the ntp socket is in use,exiting 收到此錯誤訊息的原因是由於 xntpd 已經繫結到了該 socket。執行 ntpdate 時,它會首先進...

vsftp下的乙個小錯誤

之前在自己這裡試的好好的,到了機房總出這個錯誤 500 illegal port command.425 use port or pasv first.在網上找了好久都不得行,後來才知道,這樣做即可 ftp時顯示500 illegal port command的解決或者ie無法訪問解決ftp 我一直...