Results 1 to 4 of 4

Thread: connection string

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    connection string

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.SqlClient;



    namespace Compound
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
    SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
    builder.IntegratedSecurity = true;

    string att ="AttachDbFileName=" + Application.StartupPath + "\\Database1.mdf;Integrated Security=true;Database=Database1;";
    }

    }
    }

    is this correct connection?
    how can i manipulate my database, such adding, delete, update my record

    tnx

  2. #2

  3. #3

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: connection string

    Read this ADO.NET quickstart tutorial. You'll also see how to store your connection string in a web.config file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width