Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

seoamitk

@seoamitk
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Query execution problen in C# program
    S seoamitk

    you have read just inserting code on particular event 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; using System.IO; namespace HotelProject { public partial class NewEmployee : Form { SqlConnection con; SqlCommandBuilder cmdb; SqlDataAdapter da; DataSet ds; public NewEmployee() { con = new SqlConnection("Data source=JBB-F906306D8CC\\SQLEXPRESS;Initial Catalog=Hotel;Integrated Security=SSPI"); InitializeComponent(); } private void btnBrowseImagePath_Click(object sender, EventArgs e) { OpenFileDialog op = new OpenFileDialog(); if (op.ShowDialog() == DialogResult.OK) { txtBrowseImagePath.Text = op.FileName; } } private void btnSubmitRecord_Click(object sender, EventArgs e) { con.Open(); da = new SqlDataAdapter("Select * From EmployeeDetails", con); cmdb = new SqlCommandBuilder(da); ds = new DataSet("EmployeeDetails"); if (txtBrowseImagePath.Text != "") { FileStream fs = new FileStream(txtBrowseImagePath.Text, FileMode.OpenOrCreate, FileAccess.Read); byte[] rawdata = new byte[fs.Length]; fs.Read(rawdata, 0, System.Convert.ToInt32(fs.Length)); fs.Close(); da.Fill(ds, "EmployeeDetails"); DataRow dr = ds.Tables["EmployeeDetails"].NewRow(); dr["FullName"] = txtFullName.Text; dr["FatherName"] = txtFatherName.Text; dr["DateOfBirth"] = maskedTxtDateofBirth.Text; dr["Gender"] = cmbgender.SelectedItem.ToString(); dr["Address"] = txtAddress.Text; dr["City"] = txtCity.Text; dr["Country"] = cmbCountry.SelectedItem.ToString(); dr["PhoneNo"] = txtPhone.Text; dr["EMailID"] = txtEMailId.Text; dr["LicenceNo"] = txtLicence.Text; dr["EmployeeHotelId"] = txtEhotelid.Text; dr["DepartmentName"] = cmbDepartmentName.SelectedItem.ToString(); dr["Designation"] = cmbDesignation.SelectedItem.ToString(); dr["Qualification"] = cmbQualification.SelectedItem.ToStrin

    C# csharp database visual-studio

  • Database connection question
    S seoamitk

    hi ?xml version="1.0" encoding="utf-8" ? <configuration> <appSettings> <add key="Accesskey" value="Data source=.;Initial catalog=kirti;user id=sa;Password=./> </appSettings> </configuration> 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 WindowsApplication9 { public partial class Form1 : Form { SqlConnection connection; string con; public Form1() { con = System.Configuration.ConfigurationSettings.AppSettings["Accesskey"].ToString(); connection = new SqlConnection(con); InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { try { connection.Open(); SqlCommand commad = new SqlCommand("select *from " + textBox1.Text.ToString() + "", connection); SqlDataAdapter ad = new SqlDataAdapter(commad); DataSet ds = new DataSet(); ad.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } finally { connection.Close(); } } } } This code is writren in C# you have just convert into VB.NET.

    C# database question csharp winforms help

  • Database connection question
    S seoamitk

    Hi You can an app.config file to your project and write this code into it if you have done this write this code your destination form where you have to make connection. 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 WindowsApplication9 { public partial class Form1 : Form { SqlConnection connection; string con; public Form1() { con = System.Configuration.ConfigurationSettings.AppSettings["Accesskey"].ToString(); connection = new SqlConnection(con); InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { connection.Open(); } } } Here this code writern in C# language you have to just convert it into VB.NET.

    C# database question csharp winforms help

  • Back Up MsSql 2005 Using C# Code
    S seoamitk

    SqlConnection connection = new SqlConnection("Connectionstring"); SqlCommand command = new SqlCommand("BACKUP DATABASE databasename TO DISK = 'path of destination'", connection); int effect = command.ExecuteNonQuery(); if (effect < 0) { MessageBox.Show("Back Up Created"); }

    C# csharp database sql-server tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups