Click here to Skip to main content
15,915,603 members
Home / Discussions / Database
   

Database

 
AnswerRe: UNC required ??? Pin
Jon Hulatt17-Dec-04 3:50
Jon Hulatt17-Dec-04 3:50 
GeneralRe: UNC required ??? Pin
Colin Angus Mackay17-Dec-04 4:11
Colin Angus Mackay17-Dec-04 4:11 
GeneralMSDE Inquiry Pin
Member 150205616-Dec-04 21:49
Member 150205616-Dec-04 21:49 
GeneralRe: MSDE Inquiry Pin
Colin Angus Mackay17-Dec-04 2:20
Colin Angus Mackay17-Dec-04 2:20 
GeneralRe: MSDE Inquiry Pin
Member 150205617-Dec-04 13:29
Member 150205617-Dec-04 13:29 
GeneralRe: MSDE Inquiry Pin
Colin Angus Mackay17-Dec-04 13:32
Colin Angus Mackay17-Dec-04 13:32 
GeneralRe: MSDE Inquiry Pin
Rob Graham24-Dec-04 6:08
Rob Graham24-Dec-04 6:08 
GeneralListView Control Pin
RogerDodge16-Dec-04 21:41
RogerDodge16-Dec-04 21:41 
I'm new to .NET and C# coming from VisualFox background.

I'm having a tough time with this control, namely determining which row has been selected.

I have four columns, three of which are visible, the fourth contains an id which becomes the parameter to a Stored Procedure which then populates a DataGrid.

e.g.

private void listView2_SelectedIndexChanged(object sender, System.EventArgs e)
{
cmdSelectZoneCosts.Parameters["@zoneid"].Value=this.listView2.SelectedItems[0].SubItems[3].Text;
dsZoneCosts.Clear();
daZoneCosts.Fill(dsZoneCosts, "ZoneCosts");
}

For some reason, the code is executed TWICE(?) the first time the .SelectItems.Count = 0 which crashes the line. If I "trap" for that i.e.

if (this.listView2.SelectedItems.Count !=0)
{
cmdSelectZoneCosts.Parameters["@zoneid"].Value=this.listView2.SelectedItems[0].SubItems[3].Text;
dsZoneCosts.Clear();
daZoneCosts.Fill(dsZoneCosts, "ZoneCosts");
}

It works this way, but why is it running the code twice ??

Can anyone point me in the right direction to a sample walkthrough of a simple form which will display records from a database, Add, Edit, Delete functions.

Roger
GeneralSQL Syntax Error Pin
Suresh Prasad16-Dec-04 19:48
Suresh Prasad16-Dec-04 19:48 
GeneralRe: SQL Syntax Error Pin
Colin Angus Mackay17-Dec-04 2:24
Colin Angus Mackay17-Dec-04 2:24 
GeneralRe: SQL Syntax Error Pin
Suresh Prasad17-Dec-04 4:06
Suresh Prasad17-Dec-04 4:06 
GeneralDatagrid update Pin
Yulianto.16-Dec-04 16:15
Yulianto.16-Dec-04 16:15 
GeneralRe: Datagrid update Pin
Veera Raghavendra16-Dec-04 17:20
Veera Raghavendra16-Dec-04 17:20 
GeneralGenerating wrapper code for SQL Server Stored Procedure Pin
Fraas16-Dec-04 15:32
Fraas16-Dec-04 15:32 
General"Artificial" Server" -beginner question Pin
Anonymous16-Dec-04 13:49
Anonymous16-Dec-04 13:49 
QuestionServer Object - Where to find the Dll ? Pin
Vector715-Dec-04 22:37
Vector715-Dec-04 22:37 
AnswerRe: Server Object - Where to find the Dll ? Pin
Heath Stewart15-Dec-04 23:17
protectorHeath Stewart15-Dec-04 23:17 
GeneralRe: Server Object - Where to find the Dll ? Pin
Vector716-Dec-04 1:45
Vector716-Dec-04 1:45 
GeneralRe: Server Object - Where to find the Dll ? Pin
Colin Angus Mackay16-Dec-04 2:34
Colin Angus Mackay16-Dec-04 2:34 
GeneralRe: Server Object - Where to find the Dll ? Pin
Vector716-Dec-04 3:58
Vector716-Dec-04 3:58 
GeneralRe: Server Object - Where to find the Dll ? Pin
Heath Stewart16-Dec-04 5:26
protectorHeath Stewart16-Dec-04 5:26 
GeneralRe: Server Object - Where to find the Dll ? Pin
Vector716-Dec-04 23:41
Vector716-Dec-04 23:41 
GeneralRe: Server Object - Where to find the Dll ? Pin
Heath Stewart17-Dec-04 1:00
protectorHeath Stewart17-Dec-04 1:00 
QuestionHow to databound listbox with three table relational structure? Pin
Origon15-Dec-04 22:31
Origon15-Dec-04 22:31 
GeneralReporting Service : custom parameter Pin
Member 150632215-Dec-04 5:42
Member 150632215-Dec-04 5:42 

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.