G
Guest
Hello,
Not sure if there is a NEW way to do all this with asp.net 2,
here is an example of the way i used to do it and then I have questions to
follow:
store procedure example
CREATE PROCEDURE TEST_TEST
@TNUMBER NVARCHAR (10),
@ODRCOMMENT NVARCHAR(100) OUTPUT,
@RTASK NVARCHAR(1) OUTPUT
AS
SELECT @COMMENT = 'CANNOT COMPLETE ORDER'
SELECT @RTASK = 0
GO
default.asp page.....
SET Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = Application("Connection1_ConnectionString") ' pulls
from global.asa
Conn.Open
Set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = Conn
cm.CommandText = "TEST_TEST"
cm.CommandType = adCmdStoredProc
Set p = cm.Parameters
p.append cm.CreateParameter("@TNUMBER",adInteger,adParamInput,50)
p.append cm.CreateParameter("@COMMENT",adVarWChar,adParamOutput,100)
p.append cm.CreateParameter("@RTASK",adVarWChar,adParamOutput,1)
cm.Execute
If cm.Parameters("@RTASK").Value = 1 THEN
'DO SOMETHING ELSE
END IF
CM.CLOSE
CONN.CLOSE
SET CM = NOTHING
SET CONN = NOTHING
my question is:
1. How would this be done with Visual Studio 2005?
2. How would you connect to the web.config connectionStrings that has been
setup.
I seen this article of:
http://msdn.microsoft.com/data/data...ull=/library/en-us/dnvs05/html/vsgenerics.asp
but I don't think that relates as well as many other article that I have
looked at.
Struggling to get into the future or programming....
Tdar
Not sure if there is a NEW way to do all this with asp.net 2,
here is an example of the way i used to do it and then I have questions to
follow:
store procedure example
CREATE PROCEDURE TEST_TEST
@TNUMBER NVARCHAR (10),
@ODRCOMMENT NVARCHAR(100) OUTPUT,
@RTASK NVARCHAR(1) OUTPUT
AS
SELECT @COMMENT = 'CANNOT COMPLETE ORDER'
SELECT @RTASK = 0
GO
default.asp page.....
SET Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = Application("Connection1_ConnectionString") ' pulls
from global.asa
Conn.Open
Set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = Conn
cm.CommandText = "TEST_TEST"
cm.CommandType = adCmdStoredProc
Set p = cm.Parameters
p.append cm.CreateParameter("@TNUMBER",adInteger,adParamInput,50)
p.append cm.CreateParameter("@COMMENT",adVarWChar,adParamOutput,100)
p.append cm.CreateParameter("@RTASK",adVarWChar,adParamOutput,1)
cm.Execute
If cm.Parameters("@RTASK").Value = 1 THEN
'DO SOMETHING ELSE
END IF
CM.CLOSE
CONN.CLOSE
SET CM = NOTHING
SET CONN = NOTHING
my question is:
1. How would this be done with Visual Studio 2005?
2. How would you connect to the web.config connectionStrings that has been
setup.
I seen this article of:
http://msdn.microsoft.com/data/data...ull=/library/en-us/dnvs05/html/vsgenerics.asp
but I don't think that relates as well as many other article that I have
looked at.
Struggling to get into the future or programming....
Tdar