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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

Twyce

@Twyce
About
Posts
29
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Getting the selected items from a radioButton group
    T Twyce

    I am trying to get the seleted radioButton from a group of radio buttons. The program is supposed to check on the database for controls that match the selected radiobuttons. The radiobuttons are named High,Medium,Low. For example If a person selects High, the program must go through the database and choose all the controls that are rated High and then must load them into a listBox. My problem is that the code i am using does not see the selected items and does not load the listBox. I am usig SQL server database and stored procedures to do this. Any suggestions on how i can go about doing this will be appreciated.

    C# database sql-server sysadmin regex help

  • getting the selectedItem in a checkedListBox from another method
    T Twyce

    I am trying to access checked Items in a checkedListbox from another method.Problem is, using "Selecteditem" and "SelectedIndex" does not work, it appears as if there aren't any items selected from the list. is there any other way I can read from the CheckedBoxList list or What am i doing wrong? Please help

    C# help question

  • BeginLoadData()?????
    T Twyce

    The following code is supposed to be comparing two datasets and then load the rows that are not duplicates into a third datatable.Instead it repeats the rows that are already in the database(making more duplicates).Could someone tell me what i am doing wrong. foreach (DataRow parentrow in dsImport.Tables[2].Rows) { DataRow[] childrows = parentrow.GetChildRows(r); if (childrows == null || childrows.Length == 0) dtImport.LoadDataRow(parentrow.ItemArray, true); } foreach (DataRow databaseRow in dsImport.Tables["StudentModule"].Rows) { foreach (DataRow spreadRow in dsImport.Tables["Sheet1$"].Rows) { if (spreadRow != databaseRow) { dtImport.BeginLoadData(); } } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } return dtImport

    C# database question

  • comparing two dataTables
    T Twyce

    yes I want to Fill thesame dataset so that the comparison can be done and then create a third datatable

    C# debugging help question

  • comparing two dataTables
    T Twyce

    i filled the dataset but it is still doing the same thing. Anything else i'm missing???

    C# debugging help question

  • comparing two dataTables
    T Twyce

    Thank you very much.i did not see that

    C# debugging help question

  • comparing two dataTables
    T Twyce

    I am trying to create a relation between two datatables.Here is the code i am using SqlConnection conDatabase = new SqlConnection(databaseConnectionString); SqlCommand cmdDatabase = new SqlCommand("SELECT * FROM StudentModule",conDatabase); SqlDataAdapter daDatabase = new SqlDataAdapter(cmdDatabase); //Get Columns for DataRelation DataColumn[] databaseColumns = new DataColumn[dsImport.Tables[0].Columns.Count]; for (int i = 0; i < databaseColumns.Length;i++) { databaseColumns[i] = dsImport.Tables[0].Columns[i]; } OleDbConnection conSpread = new OleDbConnection(spreadSheetConnectionString); OleDbCommand cmdSpread = new OleDbCommand("SELECT * FROM[Sheet1$]",conSpread); OleDbDataAdapter daSpread = new OleDbDataAdapter(cmdSpread); //Get Columns for DataRelation DataColumn[] spreadColumns = new DataColumn[dsImport.Tables[1].Columns.Count]; for (int i = 0; i < spreadColumns.Length;i++) { spreadColumns[i] = dsImport.Tables[1].Columns[i]; } //Create DataRelation DataRelation r = new DataRelation(string.Empty,databaseColumns, spreadColumns,false); dsImport.Relations.Add(r); The problem is that when i debug and step into the code the debugger does not go into the for loops,and therefore does not load the columns.What could be causing this plz help?

    C# debugging help question

  • Check if a field exists in a table before adding it to another table
    T Twyce

    thanx ey.wil do that

    C# question database help

  • Checking if a field exists in a table before adding it to another table
    T Twyce

    Hi Guys If anyone can help me with this it would be greatly appreciated. K here is what's happening.I am supposed to check if a student exists in the STUDENT table and then check if a module exists in the MODULE table.if they exist in both tables I must add the student(StudentNumber) and the module(ModuleCode) to the STUDENTMODULE table(register the student). How do i do this plz help

    Database help question

  • Check if a field exists in a table before adding it to another table
    T Twyce

    Hi Guys k here is what's happening.I am supposed to check in the STUDENT table if a student exists and then check if a module exists in the MODULE table.If they exist in both tables I am supposed to add the student(studentNumber) and the module(ModuleCode) to the STUDENTMODULE table(register them for the module).this is to avoid registering students that do not exist in the database. How do i do this? plz help

    C# question database help

  • Selecting certain data in a datagrid and Export it to Excel???
    T Twyce

    Hi All My code is already exporting datafrom a datagrid to an excel spreadsheet.My grid has student numbers and the modules they are registered for. example: StudentID ModuleCode s20600752 WIC2345 s20569875 POP3456 s20587466 TYU8765 s20569875 UYT6788 Now I want to be able to select a ModuleCode from the grid and only export students that are registered for that particular module. Is this possible? please help?

    C# css help tutorial question

  • Export datagrid to excel
    T Twyce

    I'm exporting data from a datagrid to an excel spreadsheet.I want the spreadsheet to open and display the data when the data is exported(when you click button export).How do i go about making that happen.Please help

    C# help question

  • Violation of PRIMARY KEY constraint????
    T Twyce

    Thanx for replying so quick. i have jst set my primary key on both fields an ran it and it still gives me the same error.

    C# help database question sql-server sysadmin

  • Violation of PRIMARY KEY constraint????
    T Twyce

    yes you can say that coz i insert a student number more than once but with a different module code example StudentID ModuleCode s20600752 WIC33222 s20502106 MKI4563 s20600752 LKH7566 s20600752 POU35568 s20502106 KLK67887

    C# help database question sql-server sysadmin

  • Violation of PRIMARY KEY constraint????
    T Twyce

    thnx ey i'll try that and get back to you

    C# help database question sql-server sysadmin

  • Violation of PRIMARY KEY constraint????
    T Twyce

    Ok here is what i am doing.The tble is an asociative entity between table student and table module.so it gets its data from both tables.what i did was jst make the StudentID(from table student) my primary key.A student can be registerd for more than 1 module .i want to have duplicate student numbers but with different module IDs. do you get me?

    C# help database question sql-server sysadmin

  • Violation of PRIMARY KEY constraint????
    T Twyce

    the StudentNumber is my primary key

    C# help database question sql-server sysadmin

  • Violation of PRIMARY KEY constraint????
    T Twyce

    I am using bulkcopy to import data into SQL server database.The data i'm trying to import contains student numbers and the modules that they are registerd for.A student can be registered for many modules(which means one student number can appear many times on the table).Problem is when i try to import my spradsheet my application throws a "Violation of PRIMARY KEY constraint" error. How do i fix this

    C# help database question sql-server sysadmin

  • Format of the initialization string does not conform to specification starting at index 0.????
    T Twyce

    it is not giving me a particular value just _sourceConnection.sourceConnection

    C# database help sql-server sysadmin security

  • Format of the initialization string does not conform to specification starting at index 0.????
    T Twyce

    What do you mean when you say I change it in the constructor? The debugger does not even allo me to step over the line,it just keeps throwing the error

    C# database help sql-server sysadmin security
  • Login

  • Don't have an account? Register

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