S
suzzimmi
Hello,
My problem is as follows:
I have built a windows service to run a vb program in a specified time
(says, run in every four hours or so).
The windows service program itself works fine.
The vb program consists of two VB classes in two separated .vb files in
which Class A is a logic codes while Class B is accomodated with stored
procedures and other DB stuff.
When executing a line of code calling the Class B vb files (which is
consisted of calls to use stored procedure link with the SQL Server), the VB
program jumps out itself back to the windows service. It seems like the VB
program skipping execution when dealing with stored procedure.
===================
In Class B,
Dim strConn as String = "Database=abc; server=135; uid=sa; pwd=0000;"
"
"
" (Inside a sub of Class B)
SqlHelper.ExecuteNonQuery(strConn, "sp_DoSomething", _var1)
"
===================
I also tried to use like this:
SqlHelper.ExecuteNonQuery("Database=abc; server=135; uid=sa; pwd=0000;",
"sp_DoSomething", _var1)
to test if that works but still failed (the VB program stops executing the
rest of the codes and jumps back to the window service).
Does anyone know why? and solution?
Thousands thanks!
My problem is as follows:
I have built a windows service to run a vb program in a specified time
(says, run in every four hours or so).
The windows service program itself works fine.
The vb program consists of two VB classes in two separated .vb files in
which Class A is a logic codes while Class B is accomodated with stored
procedures and other DB stuff.
When executing a line of code calling the Class B vb files (which is
consisted of calls to use stored procedure link with the SQL Server), the VB
program jumps out itself back to the windows service. It seems like the VB
program skipping execution when dealing with stored procedure.
===================
In Class B,
Dim strConn as String = "Database=abc; server=135; uid=sa; pwd=0000;"
"
"
" (Inside a sub of Class B)
SqlHelper.ExecuteNonQuery(strConn, "sp_DoSomething", _var1)
"
===================
I also tried to use like this:
SqlHelper.ExecuteNonQuery("Database=abc; server=135; uid=sa; pwd=0000;",
"sp_DoSomething", _var1)
to test if that works but still failed (the VB program stops executing the
rest of the codes and jumps back to the window service).
Does anyone know why? and solution?
Thousands thanks!