>Thank you for apply me first. Yes in the same network . I check the Realtek PCIe GBE status speed is 1.0 Gbps.
>And then i use break point to check my code where slow , i find connect open is no problem but execute sql is very slow.
>After i try to entry I:\Apos.DBF in start > run to open it in network speed is ok but if i execute basic sql , it will very slow.
The only time I use ExecuteScalar is from an insert command to get the primary key which was just created on the newly inserted record. I usually put the command into the dataadapter and using oDataAdapter.Fill(oDataSet) to fill the result into a dataset.
Were you able to obtain fast result using that approach on other SQL commands? If yes, have you tried to return only one record such as Where PrimaryKey=1. This will make sure it is not related to a SQL optimization. Make sure however that the primary key field is indexed. Otherwise, maybe the ExecuteScalar thing is a factor in the way it is used and I would then use the approach I recommand.