Click here to Skip to main content
15,920,956 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to open a sql 2005 database in sql server 2005 Pin
Not Active29-Jul-05 11:54
mentorNot Active29-Jul-05 11:54 
GeneralConnection string Pin
SeLoRBIS28-Jul-05 1:17
SeLoRBIS28-Jul-05 1:17 
GeneralRe: Connection string Pin
Marc Soleda28-Jul-05 5:54
Marc Soleda28-Jul-05 5:54 
GeneralRe: Connection string Pin
SeLoRBIS30-Jul-05 8:16
SeLoRBIS30-Jul-05 8:16 
GeneralRe: Connection string Pin
Marc Soleda31-Jul-05 21:00
Marc Soleda31-Jul-05 21:00 
GeneralRe: Connection string Pin
SeLoRBIS5-Aug-05 7:41
SeLoRBIS5-Aug-05 7:41 
GeneralRe: Connection string Pin
Marc Soleda7-Aug-05 20:18
Marc Soleda7-Aug-05 20:18 
GeneralUrgent !regarding sqlDataAdapter.Update Method Pin
Madni Abbasi28-Jul-05 0:31
Madni Abbasi28-Jul-05 0:31 
Hi,

my work hierarchy is as follows.

sqlStr = "select * from voucherTransaction where CompanyCode='" & compCode & _
"' and vtCode='" & mcmbVoucherType.SelectedItem.col1 & "' and
voucherNo=" & txtVoucherNo.Text

parameter.Value = sql // sqlCommand parameter object
davd.SelectCommand = cmd // cmd is sqlCommand and davd is sqlDataAdapter object
davd.Fill(dsvd, "voucherDetail") // dsvd is DataSet
davd.Dispose()

//after populating dataSet i need to delete a specific row . and the deletion
code is
dsvd.Tables("voucherDetail").Rows.RemoveAt(lastRow)//lastrow is secific row no
dsvd.Tables("voucherDetail").AcceptChanges()

//now i need to add new row as

dsvd.Tables("voucherDetail").Rows.Add(drow) // drow is DataRow

//now updating the DataSet as follows

sqlStr = "select * from voucherTransaction where CompanyCode='" & compCode & _
"' and vtCode='" & mcmbVoucherType.SelectedItem.col1 & "' and
voucherNo=" & txtVoucherNo.Text
parameter.Value = sqlStr
davd.SelectCommand = cmd
Dim cbvd As New SqlCommandBuilder(davd)
davd.Update(dsvd.Tables("voucherDetail"))
davd.Dispose()

Now the error is " can't insert the duplicate key value"
I have displayed the DataSet table (voucherDetail),there isn't any duplicate value but its showing error for that specific row because its not deleting from the database.

Please help me immediately if u have some suggestions


GeneralDB choice Pin
Marc Soleda27-Jul-05 22:33
Marc Soleda27-Jul-05 22:33 
GeneralRe: DB choice Pin
Hesham Amin29-Jul-05 2:47
Hesham Amin29-Jul-05 2:47 
GeneralSELECT Query in SQL Server 2000 Pin
Atul Kharecha27-Jul-05 21:41
Atul Kharecha27-Jul-05 21:41 
GeneralRe: SELECT Query in SQL Server 2000 Pin
maciekj28-Jul-05 3:19
maciekj28-Jul-05 3:19 
GeneralRe: SELECT Query in SQL Server 2000 Pin
Hesham Amin29-Jul-05 2:51
Hesham Amin29-Jul-05 2:51 
GeneralProblem with dataview Pin
Chetan Ranpariya27-Jul-05 19:33
Chetan Ranpariya27-Jul-05 19:33 
Generalado problem Pin
ting66827-Jul-05 18:20
ting66827-Jul-05 18:20 
GeneralRe: ado problem Pin
Marc Soleda28-Jul-05 5:57
Marc Soleda28-Jul-05 5:57 
GeneralRe: ado problem Pin
ting66828-Jul-05 16:57
ting66828-Jul-05 16:57 
GeneralRe: ado problem Pin
Marc Soleda28-Jul-05 20:57
Marc Soleda28-Jul-05 20:57 
GeneralConnect to Stored procedure in sql using ADO.NET FROM ASP.NET c# Pin
mtasaad27-Jul-05 18:19
mtasaad27-Jul-05 18:19 
GeneralRe: Connect to Stored procedure in sql using ADO.NET FROM ASP.NET c# Pin
Christian Graus27-Jul-05 18:29
protectorChristian Graus27-Jul-05 18:29 
GeneralChoice of Database Pin
nad226327-Jul-05 18:05
nad226327-Jul-05 18:05 
GeneralRe: Choice of Database Pin
Christian Graus27-Jul-05 18:09
protectorChristian Graus27-Jul-05 18:09 
GeneralRe: Choice of Database Pin
nad226328-Jul-05 5:43
nad226328-Jul-05 5:43 
GeneralRe: Choice of Database Pin
Christian Graus28-Jul-05 15:13
protectorChristian Graus28-Jul-05 15:13 
GeneralRe: Choice of Database Pin
Luis Alonso Ramos28-Jul-05 15:47
Luis Alonso Ramos28-Jul-05 15:47 

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.