|
-
February 24th, 2010, 04:50 AM
#1
MS Chart - design time vs. run time
Hi,
'Theory' or 'Practice' question here-
I am writing a client for a SQL Server DB- I have a copy of the DB locally on my laptop as well as on a server.
I knew my local schema was slightly off, but thought it would not matter much.
Anyway after three days programming I had a nice working prototype.
Plugging in to the server I found a column name was wrong (which I knew), and the DB name was ....2 not ...
CHanging these in code is a snip, as was updating the copy DB, BUT the design time controls in C# are a nightmare- they are 'binding' in the background to the old schema / DB name.
The form now refuses to run.
I can't find the text forms of the auto code to correct, and those that I can are regenerated so an edit does not work. Going through the GUI, I can address the SQL code 'Select from' or whatever, but cannot get 'to' the DB name. I can't seem to kick the Wizard back in to re-auto gen the table name etc (and what i can get to crashes as the DB is no longer available).
SO- is there an example of how to do this? What is 'practice' for a problem such as this?
SHould I just back up the code, delete the Chart objects & re drag & drop?
Seems crazy you cannot access the code- or have I something wrong.
Any advise gratefully received.
J.
-
February 24th, 2010, 11:47 PM
#2
Re: MS Chart - design time vs. run time
In general it's not advisable to change code that has been automatically generated. I think in your case, delete and then drag and drop is the correct option.
I have an application, where a datatable is populated by a Stored Procedure. When my application requires extra data, I edit the Stored Procedure, remove the table from my DataSet and then re-drag the Stored Procedure on again to create the new table format...
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|