|
Hi
I need to extract files embedded in an RTF file. when I load the file in a rich textbox, it shows the embedded files and opens with thier respective applications. But I cannot access/extract them programatically. Please help.
Thank you.
RYB
|
|
|
|
|
.NET doesn't include support for processing RTF files. You either need to search for a 3rd party library, or do it manually by reading the spec[^]
Simon
|
|
|
|
|
hi
after loading data into my dataTable object, i add new Identity Column to my dataTable for display Row Number, by this method :
private void InitIdentityColumn()
{
if (this.dt.Columns.Contains("rowID"))
{
this.dt.Columns.Remove("rowID");
}
DataColumn dc = new DataColumn("rowID");
this.dt.Columns.Add(dc);
int i = 0;
foreach (DataRow row in this.dt.Rows)
{
i += 1;
row["rowID"] = i;
}
}
but when i want to add row by this code :
FrmCategory frm = new FrmCategory(false, false);
DsStack.CategoriesRow newRow = this.dt.NewCategoriesRow();
Session.SaveInSession("newCategory", newRow);
if (frm.ShowDialog() == DialogResult.OK)
{
newRow = Session.LoadFromSession("newCategory") as DsStack.CategoriesRow;
this.dt.Rows.Add(newRow);
this.adapter.Update(this.dt);
}
the following error has shown me :
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
but when i don't use InitIdentityColumn method, it was works good, my problem is that how to use InitIdentityColumn and prevent to occure this error, or how to create Identity Column by another way ? (without Row_Number() in sql server)
thanks.
|
|
|
|
|
Can I get some information on connecting to a AS400 database, a sample code snippet would also do.
Thanks
|
|
|
|
|
If it has an ODBC data source, just use the standard ADO.NET classes. If it doesn't, you may not be able to.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks man.............I got the connection..........!!!
Thanks
|
|
|
|
|
Is there a way to display the current contents of a panel on a second panel? My hope is to have an image displaying on a small size panel and when clicked, it will also be displayed on a much larger panel.
|
|
|
|
|
You probably need to write this in a way where you handle both panels, not in a way where it happen automatically. Having said that, a control has a method that draws the control to a bitmap, so it's possible to do what you want, I think
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Got it, this.PanelName.DrawToBitmap.
Thanks!
|
|
|
|
|
Yeah, it came to me while I was typing
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all!
I'm becoming crazy for this problem...then I must rename a file on a FTP, I've tried with the .NET framework integrated classes but I didn't resolve the problem.
Can you help me?...THX
Bye
|
|
|
|
|
You don't really rename files, you Move them with a different name, like:
File.Move("\\myfile.txt", "\\myNewFile.txt");
Does that help you out?
Not sure exactly what you'd do with FTP, but it should be the same kinda thing.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
|
THX, but i've already tried this solution...else?? THX
Bye
|
|
|
|
|
Can you please provide me a code snippet or link where I can find out how to retrive values from datbase into combo box ?
Thanks
|
|
|
|
|
You get the values from the database, then make the data set you get back the data source for the combo box.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks Christian but I tried doing what you said let me just copy paste my code
DataSet ComboboxLicencegrpID;
ComboboxLicencegrpID = CombolicencegrpID();
this.LicensegrpIDBox.DataSource = ComboboxLicencegrpID.Tables["comboLicenseGroupID"];
public DataSet CombolicencegrpID()
{
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select Name,LicenseGroupID from webqa_state.dbo.METADATA_LicenseGroups";
cmd.Connection = DBConnection.getConnection();
da.SelectCommand = cmd;
da.Fill(ds, "comboLicenseGroupID");
return ds;
}
Its giving me an outputlike this :-
In the Combobox all values are the same and its "System.Data.DataRowView"
What can be the problem ???
|
|
|
|
|
Sorry, I missed a step. There's a property you set to tell it what property to read out of each data item, such as a row name. Otherwise, it displays the ToString of the object. I think it's DataTextField or something.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It worked I have to use this which i was missing
combobox.Displaymember = "Name";
combobox.Valuemember = "Name";
Thanks !
|
|
|
|
|
*grin* that's it. I think the property I told you was the one for web forms, sorry.
Value member does not need to be set, unless you want to set a value, usually an Id, not a string.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I am able to retrive the values but I have to display in the combo box like this "Name[UserID ]"
sam[1003]
dan[2003]
If I am writing as below, It will diplay any one of these ..
combobox.Displaymember = "Name";
combobox.Valuemember = "Name";
combobox.Displaymember = "userID";
combobox.Valuemember = "userID";
What should you think I should do to get the desired result ???
|
|
|
|
|
you need to add a new column which contains the data in the format you want to display it. You can't format a value directly from multiple fields.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I did not get it if possible can you provide me some code or little more detail. I tried this
while fetching the Data I Pass the Querry Like that
"Select ID,('['+ID+']'+EnpName) As FullDeatils form Emp"
Then while DataBinding, just Give like that
combobox.Displaymember = "FullDeatils ";
combobox.Valuemember = "ID";
now
Its giving an SqlException stating "Conversion failed when converting the varchar value '[' to data type int "
|
|
|
|
|
Was able to solve actually had to cast it
select '['+CAST(ID As varchar(20))+'] '+Name As FullDetails from Emp
Resolved
|
|
|
|
|
iam declaring property in one class and using this property i want to
get a value from one page and set it to other page iwant an example code.
with regards
priya
priya
|
|
|
|