Reply

alice johnson replied to Arvind M at 05-Jul-08 03:20
Hi see this part of the code:
Try using this example

Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
Dim strConn As String = "data source=xx.xx.xxx.xxx; User ID=xxxxxx; Password=xxxxxx; Persist Security Info=True;packet size=4096"
Dim cmd As New SqlCommand("INSERT INTO Customers (FirstName, LastName)VALUES('" & txtFirstName.Text & "','" & txtLastName.Text & "')", New SqlConnection(strConn))
cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()
LoadData()
End Sub


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  insert new record in database - Arvind M  05-Jul-08 01:59 1:59:08 AM
      See this - Sujit Patil  05-Jul-08 02:16 2:16:18 AM
          re:See this - Arvind M  05-Jul-08 02:24 2:24:57 AM
              Try this - sri sri  05-Jul-08 02:28 2:28:56 AM
              Use LOOP - Sujit Patil  05-Jul-08 03:17 3:17:24 AM
      Insert new record in database - Sanjay Verma  05-Jul-08 02:44 2:44:25 AM
      solution to insert new record in database - Umapathy Kaliaperumal  05-Jul-08 02:49 2:49:26 AM
      Reply - alice johnson  05-Jul-08 03:20 3:20:32 AM
      use Bulkcopy - Vasanthakumar D  05-Jul-08 04:18 4:18:41 AM
      u can do this using xml - A K  07-Jul-08 01:20 1:20:01 AM
View Posts

promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   


"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class