|
I just found it is part of an example on sourceforge. But its not as important as finding out how the sftp works, necessary lib's and especially lin/win compatability. So regardless of this lib file that someone created, how do i sftp??
George Berry
|
|
|
|
|
Will this[^] article help?
/ravi
|
|
|
|
|
Thanks, now all i have to to is finish the serial port prog im working on, decypher whats going on in that example, and im all set.
George Berry
|
|
|
|
|
Hi I am developing a windows application (VS 2003) in which it contains some buttins and a grid. The Grid has to show all the data from a csv file, for this i am reading all the data from csv file into datatable and giving that datatable as a datasource to data grid.
dtTable = new DataTable();
dtTable.Columns.Add("Name");
dtTable.Columns.Add("Time1");
dtTable.Columns.Add("Time2");
dtTable.Columns.Add("Path");
dtTable.Columns.Add("IconName");
dtTable.AcceptChanges();
if(File.Exists(Application.StartupPath + "\\Recordings.csv"))
{
StreamReader sreader = new StreamReader(Application.StartupPath + "\\File.csv");
string strval = sreader.ReadLine();
while (strval != null)
{
DataRow row1 = dtTable.NewRow();
string[] str = strval.Split(',');
for(int i = 0; i < str.Length; i++)
{
row1[i] = str[i];
}
dtTable.Rows.Add(row1);
strval = sreader.ReadLine();
}
dtTable.AcceptChanges();
sreader.Close();
// }
dtGrid.DataSource = dtTable;
dtGrid.Refresh();
I am using the above code for showing the contents of file to Grid.
if user clicks start button on the form, after completing the action i want to add a row to grid. For this i am writing the new row to the CSV file and calling the above code.
But it is giving error: "Controls created on one thread cannot be parented to a control on a different thread."
Any one please help me.
Thanks in Advance
|
|
|
|
|
You need to always deal with your controls in your main thread.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
use an event to trigger the creation of your control on the main thread, or use this.InvokeRequired to force you control to be created on the main thread
|
|
|
|
|
Thank you for your reply.
I dont know how to use invoke.
If you know any links regarding the invoke and triggering events please provide them to me.
Thanks in Advance
Thanks and Regards
Ramu
|
|
|
|
|
Hello Everybody,
I am not able to change the sql connection string of crystal report.
Actually I had two database one testing and other online database .
I had created the reports on database testing but now i want change it to online database but I am not able to do this.
Regards,
rahul saini
|
|
|
|
|
How do you define your connection string?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Hi,
Thanks for replying me.
I had define connection string using wizard.
I am working on .net 2005 and using sql 2000 as database.
Regards,
rahul saini
|
|
|
|
|
Rahul,
Try to search for this property setdatabaselogon of the ReportDocument class.
|
|
|
|
|
monuSaini wrote: I had define connection string using wizard.
*shudder*
Don't! Learn how it works and don't rely on wizards.
Somewhere there should be generated code that contains the connection string. Alter that to get the connection string from the config file.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
hi all,
how to add data from database table to the combobox,
where i want to read a certain feild and when selected an other feild would be written in somewhere else
|
|
|
|
|
Which technology are you using: Windows Forms, ASP.net, WPF or other?
|
|
|
|
|
costavo wrote: how to add data from database table to the combobox,
where i want to read a certain feild and when selected an other feild would be written in somewhere else
SqlConnection dbConn = new SqlConnection ("connectionstring");<br />
dbConn.Open ();<br />
SqlDataAdapter da = new SqlDataAdapter ("SELECT town FROM Table", dbConn);<br />
da.Fill (ds);<br />
<br />
DropDownList1.DataSource = ds.Table[0];<br />
DropDownList1.DataBind ();
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
You can also check my reply here[^].
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
in addition to the reply of Micheal sync
u also have to set the display member and value member properties.
set the display member to the field which u want to show.
and set the value member to the field which u want to display at some place else.
and on selectedindexchanged event set show your selected value ...
|
|
|
|
|
please would u give a code example
regards
|
|
|
|
|
costavo wrote: please would u give a code example
As I replied here,[^]
<br />
SqlConnection dbConn = new SqlConnection(connectionString);<br />
<br />
dbConn.Open();<br />
<br />
SqlDataAdapter da = new SqlDataAdapter("SELECT town,postal FROM table1", dbConn);<br />
DataSet ds = new DataSet();<br />
da.Fill(ds);<br />
<br />
dbConn.Close();<br />
<br />
DropDownList1.DataSource = ds.Tables[0];<br />
DropDownList1.DataTextField = "town";<br />
DropDownList1.DataValueField = "postalcode";<br />
DropDownList1.DataBind();
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I have a WPF problem, namely my GUI top level exception handler doesn't:
<br />
public partial class ApplicationWindow : System.Windows.Window<br />
{<br />
public ApplicationWindow()<br />
{<br />
InitializeComponent();<br />
AppDomain.CurrentDomain.UnhandledException += <br />
new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); <br />
}<br />
<br />
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)<br />
{<br />
}<br />
}<br />
* The code that I've removed from here works when CurrentDomain_UnhandledException is called sucessfully. Also I have try catches round all my top level execution blocks.
The problem I get is intermittant, and has only happened on the live machines . When I look at the event log, the CurrentDomain_UnhandledException isn't called (there is no event log entry), but I get a .net 2 runtime error:
EventType clr20r3, P1 gui.exe, P2 1.0.2768.23782, P3 46af354c, P4 system.servicemodel, P5 3.0.0.0, P6 4545a17d, P7 109, P8 b0, P9 2ekkxphpp1te4kvupcgmdwsnjepb3jzg, P10 NIL.
I know the error must be from WCF which is referenced by the GUI and have put pretty decent exception trapping in my client code. I really need to know how to capture the execption at the top level in the GUI (have I missed anything?).
Thanks.
|
|
|
|
|
Hi,
I just install directX 9.0b and using VS 2005 but I cannot build any of the directX demo projects found on this site. I have the following error amoung others
The type or namespace name 'DirectX' does not exist in the namespace 'Microsoft
after installing DirectX is it necessay to set a path to it??
Thanks.
Samuel
|
|
|
|
|
Install DirectX SDK from Microsoft. Add the needed reference to your project. Then add namespace you need to compile it. If you are using VS2005, then just mouse over unknown class, then click at the small box "using DirectX.xxx.xxx.xxx", then namespace will be added automatically.
|
|
|
|
|
I have never worked with DirectX but just to be sure for others: When you say you installed DirectX, what is it that you installed exactly? The runtime or the SDK? If you didn't install the SDK, there is no chance that any DirectX project will work (I think!)
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi,
I'm experimenting on UPnP in Windows Vista Ultimate with Media Center. I've set up a few UPnP AV media servers and could connect to the data from Windows Media Player. But in Media Center I could only browse local files and no files from other UPnP servers.
That's why I'd try to write a C# UPnP client, that uses ALL available AV servers and not only the local storage in Vista MCE.
I've found out there are Intel tools für UPnP, but they are written in C. There is also UPnP support in Platform SDK CE, but I'm using UPnP on a standard PC.
I did not find any UPnP clients in C# here on codeproject. Maybe I've overlooked one in the results or someone of you knows some good external links on how to build a UPnP client in C# (without manually writing the protocol).
Thanks in advance,
Norbert
|
|
|
|
|
The Intel tools have C# stuff too the last time I looked. I didnt work on my router though, so I had to write on myself.
|
|
|
|