The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Visual Studio.net (VB6) by McGowan2005-02-14 06:25:51
  Try this by NCBob27409 2005-02-14 07:34:11
You are missing either the command to open the connection, or the connection object itself.

Try this:
personsDataAdapter.InsertCommand.CommandText = "INSERT INTO persons (ID, Name, Sex, Ability) " & _
"VALUES ('5', 'Ben', 'Male', 'Beginner')"

personsDataAdapter.InsertCommand.Connection = New SqlClient.SqlConnection("connection string info")

personsDataAdapter.InsertCommand.Connection.Open()
personsDataAdapter.InsertCommand.ExecuteNonQuery()
personsDataAdapter.InsertCommand.Connection.Close()
[ Reply ]
    And put the ExecuteNonQuery inside a "try", with by bwkaz2005-02-14 14:49:51

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)