Chevy Mark Sunderland

Chevy Mark Sunderland

  • NA
  • 188
  • 166.8k

winHttpRequest Object in asp net

Apr 6 2012 9:52 AM
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();