我有一個php code.here是代碼,我要把它翻譯成.NET,但在某些時候我遇到了一些麻煩。執行讀卡器沒有響應
function processInput($conn, $MessageArray, $mobilenumber, $date, $odd)
{
$strSQLUSER="SELECT * FROM tbl_tiduser WHERE username='".addslashes($MessageArray[0])."' AND stat!='1' AND stat!='4'";
$result_user=odbc_exec($conn,$strSQLUSER) or die("Could not connect to database");
這裏是轉換後的.NET代碼
public class ProcessInput
{
private string msg_arr;
private string MooseSeenInput(string MobileNo,string Date,string odd,params Array[] msg_arr)
{
SqlCommand com = new SqlCommand("SELECT * FROM tbl_tiduser WHERE [email protected] AND stat!='1' AND stat!='4'", mycon);
com.Parameters.AddWithValue("@username",username);
using (SqlDataReader reader = com.ExecuteReader())
// whats the next part need to come here ???
}
這incomplete.i'm不會編譯....
你會遇到什麼樣的麻煩? –