0
Answer

winHttpRequest Object in asp net

winHttpRequest Object in asp net

Hi all, I need your appreciated help.

I have this question:

1) Why if execute this net page in vbs file the insert query is not performed? If I execute the same link in the browser the insert query working.

Can you help me?

Set winHttpRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
winHttpRequest.Open "GET", "http://www.mypageweb/public/myFirstNetPage.aspx", false
winHttpRequest.Send
Set winHttpRequest = Nothing
myFirstNetPage.aspx

string cmdstr = "INSERT IGNORE INTO myFirstbl " +
"(" +
" myDate " +
") " +
" VALUES " +
"(" +
" CURRENT_DATE() " +
")";

OdbcCommand aCommand = new OdbcCommand(cmdstr, myConnectionString);
OdbcDataReader aReader = aCommand.ExecuteReader();
aReader.Close();

aCommand.Dispose();
aCommand.Cancel();
Next Recommended Forum