3 Replies - 486 Views - Last Post: 26 June 2014 - 04:37 AM Rate Topic: -----

#1 DaniAlvesBarca  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-June 14

Local Database editing in C#

Posted 26 June 2014 - 01:54 AM

Hey, I am working on a project for my uncle where I have to keep a record of his stuff in his store. I have created a local database in C#. The problem is that I want to give the user the ability to add a column when he wants by just clicking a button. Can anyone please tell me what could be the lines of code for just adding a column?? I can do the rest i-e button click check and all other stuff. I need only the code lines (Query) to add a column. Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Local Database editing in C#

#2 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3559
  • View blog
  • Posts: 10,349
  • Joined: 08-June 10

Re: Local Database editing in C#

Posted 26 June 2014 - 02:36 AM

do you mean by "adding a column" adding a new dataset or altering the table?
Was This Post Helpful? 0
  • +
  • -

#3 DaniAlvesBarca  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-June 14

Re: Local Database editing in C#

Posted 26 June 2014 - 03:02 AM

View PostDormilich, on 26 June 2014 - 02:36 AM, said:

do you mean by "adding a column" adding a new dataset or altering the table?

I mean altering the table. Note that the database store files in .sdf file extension
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 3559
  • View blog
  • Posts: 10,349
  • Joined: 08-June 10

Re: Local Database editing in C#

Posted 26 June 2014 - 04:37 AM

generally, tables should not be altered at all (except in development), esp. not by a user request. it may lead to undesired side effects (e.g. you need to update all your SQL queries) and is a hint at insufficient DB table design.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1