Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Lock
Message
From
04/03/2003 09:00:49
 
 
To
03/03/2003 16:27:57
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00760359
Message ID:
00760832
Views:
28
How do you put the value in the dataset? The key is updating, but I keep getting a null reference error for my dataset. Here is my process so far:

'Stored Procedure
CREATE PROCEDURE spGetKey
@TableName varchar(40)
AS
UPDATE tblESCGlob
SET
intKeyValue = intKeyValue + intIncrementValue
FROM
tblESCGlob
WHERE
strTableName = @TableName
GO

'Here is my code
strSQL = "spGetKey"
objConn = ""
dim objCmd As SqlClient.SqlCommand
objCmd = New SqlClient.SqlCommand(strSQL, objConn)
lADO.objCmd.CommandType = CommandType.StoredProcedure

Dim TableName As SqlClient.SqlParameter = _
lADO.objCmd.Parameters.Add("@TableName", SqlDbType.VarChar)
TableName.Value = lcTableName

objDS = New DataSet()
objConn.Open()
objDA = New SqlClient.SqlDataAdapter(Me.objCmd)
objDA.Fill(objDS, "PrimaryKey")
objConn.Close()

Thanks for the help.
Randy Belcher
AFG Industries, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform