Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Lock
Message
De
04/03/2003 09:00:49
 
 
À
03/03/2003 16:27:57
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00760359
Message ID:
00760832
Vues:
27
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform