|
|
thanks dude. Even i wanted some information on the same.
Keshav Kamat
India
|
|
|
|
|
I am getting the following error and I don't know why...
The given ColumnName 'RS-I2' does not match up with any column in DataSource.
System.Collections.ListDictionaryInternal
That Column name does exist in the datasource, and my column names & mappings are correct. Does anyone have any ideas? Thanks =)
|
|
|
|
|
Maybe the hyphen in your column name causes troubles to database. try to surround the name with square brackets, i.e. [RS-I2] .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
In my code I have the column name in brackets. It's only in the error message that it doesn't have the brackets, I thought that to be a bit strange. Also, I also few other columns that have a hyphen in them, I am only getting the error on that specific one.
-- modified at 17:12 Tuesday 1st May, 2007
|
|
|
|
|
No, this is not strange since brackets usually are not reported on error messages. I'm still doubting about the hyphen...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
bcp.ColumnMappings.Add(new SqlBulkCopyColumnMapping("RS-I2", "[RS-I2]"));
It's in brackets right there, I'm at a loss. I am about to light myself on fire and start punching myself in the face
|
|
|
|
|
Hi,
I tried to formart a double to a 10 digits, and 5 fixed points string.
say if I have a double variable with a value as "512.297812223" and want it to be displayed as " 512.29781"
I surveyed the internet , but seems not finding a solution for this issue.
You help is much appreciated.
Meng
|
|
|
|
|
.ToString("####0.00000")
---
single minded; short sighted; long gone;
|
|
|
|
|
And
System.Console.Write ( "{0:####0.0000}" , 123.456789 ) ;
|
|
|
|
|
how can I use date/time in c# to get only the time.....?
lavi
|
|
|
|
|
lavy2883 wrote:
how can I use date/time in c# to get only the time.....?
DateTime.Now.TimeOfDay(); -> returns Timespan
DateTime.Now.ToLongTimeString(); -> returns hh:mm:ss
DateTime.Now.ToShortTimeString(); -> returns hh:mm
|
|
|
|
|
The string that we want to read can contain only the time without the date .....?
|
|
|
|
|
So what you really want to do is to parse a string that represents a time of day?
You can use the ParseExact method to parse any kind of date/time value. As the result is a DateTime value, it will always has a date component, though.
---
single minded; short sighted; long gone;
|
|
|
|
|
DateTime.Now.ToLongTimeString(); -> returns hh:mm:ss
DateTime.Now.ToShortTimeString(); -> returns hh:mm
These functions gives you the time alone as a string and not the date.
Have a look at this link on MSDN.[^]
|
|
|
|
|
A DateTime value always has a date component. You can create a TimeSpan value that represents the time span from midnight.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
As Tarakeshwar showed, the TimeOfDay method does that.
---
single minded; short sighted; long gone;
|
|
|
|
|
the problem is... if the input which is a string need to have the date too or not....?
|
|
|
|
|
No, it doesn't. When parsing the string you can for example specify a format like "HH:mm:ss" which would be able to parse a string like "21:13:48". As the parsed data only contains the time component, the date component will be given a default value. I don't remember if the current date is used, or the date 0001-01-01.
---
single minded; short sighted; long gone;
|
|
|
|
|
Have you tried:
string now = DateTime.Now.ToString("HH:mm:ss");
I believe this should do exactly as you are wanting. If not, you can look up DateTime in your local help files to see if they have any other ways of doing this.
Phil
|
|
|
|
|
public void tab_Paint(object sender, PaintEventArgs e)<br />
{<br />
TabPage tab = (TabPage)sender;<br />
BufferedGraphicsContext context;<br />
BufferedGraphics buffer;<br />
context = new BufferedGraphicsContext();<br />
Graphics grfx = e.Graphics;<br />
buffer = context.Allocate(grfx, tab.ClientRectangle);<br />
drawSurfaceToBuffer(buffer.Graphics);<br />
buffer.Render(grfx);<br />
buffer.Dispose();<br />
grfx.Dispose();<br />
}<br />
public void drawSurfaceToBuffer(Graphics bufferGrfx)<br />
{<br />
}
this code i understand it from MSDN and write it to reduce Graphics Flicker but it does not make any thing at all also it make my background of tabpage black and the original is white
is there any suggestions please
Generator
-- modified at 10:59 Tuesday 1st May, 2007
|
|
|
|
|
I think this code is meant to reduce flicker for user-painted graphics. If you're just putting controls onto the tabpage and seeing flickering whenever you move/resize, this code won't help you at all, and might actually slow you down.
You might just have too many controls, which leads to too much layout logic. I would suggest trying to limit the number of controls and nested containers. For instance, putting panels inside panels inside panels, each with their own anchors, docks, and layout engines, will really slow you down whenever you resize.
|
|
|
|
|
In the 2.0 Framework there was a lot of work incorporating Double Buffering into the framework. For the form that holds the flickering control, try adding this at initialization time:
this.SetStyle( ControlStyles.OptimizedDoubleBuffer );
this.SetStyle( ControlStyles.AllPaintingInWmPaint );
These two settings go hand-in-hand. Also when loading controls on the tab,
this.TabControl.SuspendLayout();
LoadControl(TabControl);
this.TabControl.ResumeLayout();
|
|
|
|
|
hi ,
i can not find a method called LoadControl()
thanx
Generator
|
|
|
|