|
Better u can use arraylist and solve this issue.
otherwise u can define the int array and size.
Continue...
|
|
|
|
|
Pfft... recursion is the way to go here. All classroom assignments require recursion.
|
|
|
|
|
Hi,
This is my interface
DataTable FindAll();<br />
implementation is
<br />
public DataTable FindAll()<br />
{ String query = "SELECT * FROM Media";<br />
DataTable dt = util.DatabaseManager.ExecuteQuery(ConnectionString, query, "outdoordata");<br />
if (dt.Rows.Count == 0)<br />
{<br />
return null;<br />
}<br />
return new media(dt.rows[0]);------it is showing error "cannot implicitly convert media to system.data.datatable.<br />
}<br /> Here is media is class which done the following
<br />
public class media<br />
{<br />
public Media(DataRow dr)<br />
{<br />
if (dr["media_type_id"] != DBNull.Value)<br />
{<br />
this.media_type_id = Int32.Parse(dr["media_type_id"].ToString());<br />
}<br />
if (dr["description"] != DBNull.Value)<br />
{<br />
this.description = dr["description"].ToString();<br />
}<br />
if (dr["width"] != DBNull.Value)<br />
{<br />
this.width = Double.Parse(dr["width"].ToString());<br />
}<br />
<br />
}<br /> It is giving error is "cannot implicitly convert media to system.data.datable
murali krishna
|
|
|
|
|
Your function's signature is DataTable FindAll() , therefore it should return a DataTable object and not a Media one
Change the return type to Media .
SkyWalker
|
|
|
|
|
Hi I am using firebird database using C#.Net.I am unable to connect firebird db windows application and windows service, at a time only one application is working with fire bird db.
Please help me how to connect firebird db from two applicatins like windows application(Desk Top)and windows service.
|
|
|
|
|
Hello,
I am using listview to add, delete and update items. Updation is done every 100ms and there is a lot of flickering. I used BeginUpdate() and Endupdate() while removing and inserting new row. The flickering reduces when the application is run on Windows 2000 but not on Windows XP, Any idea?
Thanks,
Sushma
|
|
|
|
|
YourControl.SuspendLayout()
... do something ...
YourControl.ResumeLayout()
SkyWalker
|
|
|
|
|
Thanks... I tried it out but there was no difference in flickering
|
|
|
|
|
If this is a windows form, then you may need to set the form for double buffering. A search here or on the web will show you how.
|
|
|
|
|
|
Your C# program is going to try and access the fortran code via COM. So your Fortran code has to expose the COM interface in order for C# to properly communicate with it.
|
|
|
|
|
thanks for your reply, your advice may be a pretty good solution, but for me that's a little tough, I have no idea of Com.Anyway, thanks a lot.
|
|
|
|
|
Is the FORTRAN program developed within the .NET environment?
If not, how is the FORTRAN written? That tool may have an option to expose the FORTRAN to COM aS part of the build process.
|
|
|
|
|
hi friend im using vs2005.how can i add AjaxContolToolkit to my web application?
Hi,Im Razana
|
|
|
|
|
razanabanu wrote: hi friend im using vs2005.how can i add AjaxContolToolkit to my web application?
1 - You have chosen wrong forum. Post it in ASP.NET forums.
2 - Use google to find this, There are tons of articles explaining how to add it,
|
|
|
|
|
I'm curious as to the discrepancy between your subject and your question. They should have a better (more concrete) relationship.
|
|
|
|
|
hello frnds,
i am using C#.Net 2.0 window based application.
i want to disable Windows close button.
how can do that ???
any API ???
please help.
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi,
You can use FormClosing event for disable the close button.
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
}
Please let me know if this help you.
Thanks,
Gopal.S
Gopal.S
|
|
|
|
|
You need PInvoke for that. Check this[^]
|
|
|
|
|
Hi all,
Can Anyone tell me how i can check the type of a file?I mean i want to add checking file if the file not a .doc files then i want to show message box To show that the file extension is not .doc files
Thank U For The Help
Regards,
Tomi
|
|
|
|
|
Already solved by using FileInfo.Extension
Thank U
Regards,
Tomi
|
|
|
|
|
That is a basic check. It will not work if a DOC file is named, say, XLS. To be sure, you have to look at the file header.
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
The right way to do this is going to be using the SHGetFileInfo Win32 API. You will need to retrieve the SHGFI.TYPENAME value.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Good day to everyone, can someone guide me on how to implement graphs (bars, lines, pies) on visual c#? Is it possible? I found some information regarding .net, but I really do not understand it that much. Thank you...
Oh yeah, very much appreciated if someone can also give me sources that helps a lot...
|
|
|
|
|
You can search that yourself, either with Google, or with the CodeProject search box on top
of this page. One of the many CP articles you may like is this one[^].
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|