Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add record using vb.net in sql server 2000
Message
De
19/01/2003 02:31:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Add record using vb.net in sql server 2000
Divers
Thread ID:
00743226
Message ID:
00743226
Vues:
55
I write following code for insert record.

Dim invenConn As SqlConnection = New SqlConnection("Data Source=DEVELOPE;Integrated Security=SSPI;" & _
"Initial Catalog=inventory")

Dim Invecmd As SqlCommand = New SqlCommand("INSERTGODOWN", invenConn) 'Declare For Sql Command
Invecmd.CommandType = CommandType.StoredProcedure
Dim MyParm As SqlParameter 'Declare For Parameters
MyParm = Invecmd.Parameters.Add("@godname", SqlDbType.VarChar, 15)
MyParm.Value = LTrim(txtGodownName.Text)
invenConn.Open()
Invecmd.ExecuteNonQuery()
Invenconn.Close()
Invecmd.Dispose()
Invenconn.Dispose()

Executing above code follwoing message occure

an unhandled execption of type 'System.data.Sqlclient.Sqlexecption'
occurred in syystem.data.dll

Aditional information : system error.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform