Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add record using vb.net in sql server 2000
Message
From
19/01/2003 02:31:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Add record using vb.net in sql server 2000
Miscellaneous
Thread ID:
00743226
Message ID:
00743226
Views:
54
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.
Next
Reply
Map
View

Click here to load this message in the networking platform