Click here to Skip to main content
15,885,546 members
Home / Discussions / C#
   

C#

 
AnswerRe: SQL Pin
PIEBALDconsult27-Jan-10 5:29
mvePIEBALDconsult27-Jan-10 5:29 
QuestionProblem with a newer version of a dll Pin
KittyKit27-Jan-10 2:58
KittyKit27-Jan-10 2:58 
AnswerRe: Problem with a newer version of a dll Pin
ddecoy27-Jan-10 3:17
ddecoy27-Jan-10 3:17 
GeneralRe: Problem with a newer version of a dll Pin
KittyKit27-Jan-10 3:30
KittyKit27-Jan-10 3:30 
GeneralRe: Problem with a newer version of a dll Pin
ddecoy27-Jan-10 3:37
ddecoy27-Jan-10 3:37 
GeneralRe: Problem with a newer version of a dll Pin
KittyKit27-Jan-10 4:47
KittyKit27-Jan-10 4:47 
Questionsystem._ComObject databinding [modified] Pin
ddecoy27-Jan-10 2:30
ddecoy27-Jan-10 2:30 
Questionpls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
vidhulibra 27-Jan-10 1:10
vidhulibra 27-Jan-10 1:10 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data.Odbc;
using System.Data.Common;
using System.Data;
using System.IO;

namespace sample27
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("values get inserted");
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
}
}
class v
{
public static void main(string[] args)
{
string name = null;
string pwd = null;
int i=0;
string connstr = "/*connection string*/"
SqlConnection conn = new SqlConnection(connstr);
conn.Open();
StreamReader sr = new StreamReader(@"e:\v.txt");
string query = "insert into samplereg(username,password) values(@username,@password)";
name= sr.ReadLine();
while (name != null)
{
i++;
SqlCommand cmd = new SqlCommand(query, conn);
cmd.Parameters.Add("@username", name);Mad | :mad: //error
cmd.Parameters.Add("@password", pwd );
cmd.ExecuteNonQuery();
name = sr.ReadLine();
conn.Close();
}
}
}
}
Mad | :mad: error:Add(string parametername,object value) has been depricated.use Addwithvalue(String parametername,object value)
pls reply me ......
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 1:18
mve#realJSOP27-Jan-10 1:18 
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
Vikram A Punathambekar27-Jan-10 1:20
Vikram A Punathambekar27-Jan-10 1:20 
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 1:26
mve#realJSOP27-Jan-10 1:26 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
J4amieC27-Jan-10 2:55
J4amieC27-Jan-10 2:55 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 9:36
mve#realJSOP27-Jan-10 9:36 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
Roger Wright27-Jan-10 18:26
professionalRoger Wright27-Jan-10 18:26 
QuestionSSL Certificate Status? Pin
Sunil G27-Jan-10 0:55
Sunil G27-Jan-10 0:55 
AnswerRe: SSL Certificate Status? Pin
SeMartens27-Jan-10 1:41
SeMartens27-Jan-10 1:41 
AnswerRe: SSL Certificate Status? Pin
Matt Meyer27-Jan-10 5:02
Matt Meyer27-Jan-10 5:02 
QuestionEncrytion and decryption a string [modified] Pin
3bood.ghzawi27-Jan-10 0:44
3bood.ghzawi27-Jan-10 0:44 
AnswerRe: Encrytion and decryption a string Pin
Keith Barrow27-Jan-10 1:13
professionalKeith Barrow27-Jan-10 1:13 
QuestionSQL connectivity issue in My own Windows Serive Pin
WinCrs27-Jan-10 0:29
WinCrs27-Jan-10 0:29 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
SeMartens27-Jan-10 0:53
SeMartens27-Jan-10 0:53 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
Covean27-Jan-10 1:01
Covean27-Jan-10 1:01 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
PIEBALDconsult27-Jan-10 5:32
mvePIEBALDconsult27-Jan-10 5:32 
GeneralRe: SQL connectivity issue in My own Windows Serive Pin
WinCrs27-Jan-10 18:19
WinCrs27-Jan-10 18:19 
Questionrecursive folder compare Pin
vantoora26-Jan-10 23:39
vantoora26-Jan-10 23:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.