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
J

Jacky Yiu

@Jacky Yiu
About
Posts
26
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • question on database query
    J Jacky Yiu

    Sorry for late reply. If you want to have a faster development time, you have to use the predefine or auto-gen code for your development, it will slow down the work, but it save in coding. But if you have time to design a better software structure, it will take time but faster in performance. It's depends on your choice.

    C# database question

  • question on database query
    J Jacky Yiu
    1. the connectionString has been stored in Properties.settings. 2) if you were drag and drop the datatable in to your program, SELECT, UPDATE, DELETE, INESRT Command will generate to you automatically... Depends on the usage in your program, if you will handle all sql command, it should be "faster". but if the record is not larger than 100,000. I don't think there has too much different. But development time ;P
    C# database question

  • why update data is wrong..
    J Jacky Yiu

    it's prevent if there has 2 users editing the record, if A has submit the update command, then B SHOULD NOT be update and the program should handle the roll back. a easy example, if 2 people want to buy a movie ticket online, and they were select for the same seat, if A has submit the data, could B update the DB also?? if the update command is ready, just provide the dataset/datatable to the adapter is fine in your case, it should be: father.Update(son);

    C# database question announcement

  • Setting value in installer and reading at runtime
    J Jacky Yiu

    you can store the user option in registry or in a config file, if you were not planning to write file, registry may be a choice.

    C# help question

  • question on database query
    J Jacky Yiu

    are you want to select the record from the DataTable that the row index = listBox1.SelectedIndex???? if so, why not DataRow row = store.Rows[listBox1.SelectedIndex]; name.Text = row[1].ToString(); ... And there has a RowFilter properties in DataView(or DataTable.DefaultView), you can use it for filter any record you want... check it out in MSDN: http://msdn2.microsoft.com/en-us/library/system.data.dataview.rowfilter.aspx[^]

    C# database question

  • why update data is wrong..
    J Jacky Yiu

    if your "father" (is it a good variable name?? :doh: ) mean SqlDataAdapter, why don't you update the whole dataset or datatable??? and SqlDataAdapter.Update will be execute the UpdateCommand that predefine in the SqlDataAdapter.UpdateCommand, did you set the command correctly??

    C# database question announcement

  • sql database problem
    J Jacky Yiu

    As I posted before: this.textbox.text = ds.DataTable[0].Rows[0]["name"].ToString();

    C# database question sysadmin security help

  • ListBox events
    J Jacky Yiu

    There has no OnInsert or AfterInsert, but listbox has ControlAdded and ControlRemoved, see if it's help.

    C# csharp question

  • Binding Combo box with database
    J Jacky Yiu

    Are you want the combobox contain the display and the id of the display name? If so, set the DisplayMember and ValueMember to the combobox. When SelectedIndexChanged you can get the SelectedText and SelectedValue

    C# database wpf wcf tutorial

  • Loading treeview from database using BackGroundWorker class
    J Jacky Yiu

    Add a "DoWork" event to the backgroundWorker fire backgroundWorker.RunSync(DataSet); just paste the code in backgroundWorker_DoWork is fine

    C# database tutorial

  • update desktop project from web
    J Jacky Yiu

    Build > Publish %Your Project Name% If you publish it to web, the program at client desktop will auto check the version number and update from the source url.

    C# question announcement

  • Scrolling in form
    J Jacky Yiu

    Did you set the panel2.AutoScroll to true? It's default is false

    C# question

  • sql database problem
    J Jacky Yiu

    Because the table name is the one you added in the dataset: DataTable table999; string command = "select * from Table1"; SqlDataAdapter father = new SqlDataAdapter(command, myConnection); DataSet son = new DataSet(); son.Tables.Add("Table1"); father.Fill(son, "Table1"); ... That's work. But there has only one select statement in your case, why don't you use the index rather than table name?

    C# database question sysadmin security help

  • sql database problem
    J Jacky Yiu

    this.textbox.text = ds.DataTable[0].Rows[0]["name"].ToString();

    C# database question sysadmin security help

  • Scrolling in form
    J Jacky Yiu

    you want to scroll bar show in the panel or your user control??

    C# question

  • Editable Grid On Keypress
    J Jacky Yiu

    you can add a javascript event capture the keypress, if event == f2, then fire the callback and set the gridview as editmode. FYR. function dosomething() { var key = window.event.keyCode; alert(key); }

    C# css tutorial

  • Editable Grid On Keypress
    J Jacky Yiu

    2 simple way to complete your requirement. 1.) add a menustrip in your application, then add an item and set the shortcut to f2 2.) add a keyboard event handler in your app and detect if key == Key.f2 either way to fire a function to set the gridview tobe edit mode.

    C# css tutorial

  • ToolStripMenuItems from SQL
    J Jacky Yiu

    Create a function call "GenerateToolStripMenu()" or something, when you filled the data to the dataset, fire the function. e.g. for (int i = 0; i < database1DataSet.Table1.Rows.Count; i++) { menuStrip1.Items.Add(database1DataSet.Table1.Rows[i][%your_column_name_here%].ToString()); }

    C# database help question

  • ToolStripMenuItems from SQL
    J Jacky Yiu

    why don't you create the control when the sql load completed?

    C# database help question

  • How to count imgae files in a folder
    J Jacky Yiu

    Then you can use System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders(); to get all supported image format, or you could create your own image format array to loop the extension as I mention(and what you did).

    C# csharp help tutorial lounge
  • Login

  • Don't have an account? Register

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