|
Perhaps you mean assembly tampering via key signing? Check out .NET key signing, search for it on your favorite search engine, there will be thousands of hits.
p.s. I realize English may not be your first language, but I'll warn you anyways: be more polite next time. "give me any reference" sounds too demanding. "Can you give me any reference..." would be better.
|
|
|
|
|
Hi
I want to do component: hierarchical dictionary based on DataGridView in C# (.NET 2.0 ). It don't has this component, I must do it same and I have problem with add rows to the DataGridView. When I add row like this: DataGridView row = new DataGridView(); this.DataGridview.Rows.Add(row); the new row will be add to the end of the table. I want to add the new row after the row which I click. It is posible ? if not, i will be must rewrite all rows and in the middle write my new rows. Is someone another posibility ?
I'm sory for my bad english.
Best regards
dift
I
|
|
|
|
|
You can insert a row at a specific index using the insert method:
this.DataGridview.Rows.Insert(2,row);
|
|
|
|
|
Can anyone tell me how to save the information stored in a DataTable component straigh to an Excel spread sheet?
I am trying to use the Excel COM object and not having much luck
Cheers
Give me strength, give me caffeine
|
|
|
|
|
|
Basically I did the same as you, but instead I just used to WriteXML function that I found inside the Access Tables collection, but changed the extension of the target file to a .xls
Give me strength, give me caffeine
|
|
|
|
|
Hi,
I'm trying to store escape charachters (such as '\t') in the beginning of a string.
Problem is that I'm reading the characters from a file (ini-file), and I'm using a class that automatically stores the string with the @-sign which means that the string ignores the escape characters (like writing string g = @"\t";) Is there any way I can get rid of that annoying '@' character once it has been placed there?
/Martin
|
|
|
|
|
smsmfe wrote: I'm using a class that automatically stores the string with the @-sign
smsmfe wrote: Is there any way I can get rid of that annoying '@' character once it has been placed there?
Placed where? In the code? I use the delete key to remove characters from my code. Backspace will also work if the cursor is on the right side.
|
|
|
|
|
Escape characters are only used to represent characters in a string literal in the code. There are no escape characters in a string or a file, just characters.
A @-quoted string is a verbatim string literal. That is also something that you only do in code. The @ character doesn't end up in the string literal, and putting the @ character in a string doesn't change how the string is used, it's just another character.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ok, thanks. I wanted to read it as an escapecharacter from the file, but I guess that's not possible then.
|
|
|
|
|
Hello every one.
i have been working on web parts for sharepoint and i am using c# to develope the web parts.
my problem is huge and i have to explain it so you people can help me out
Summary..
I am downloading image from SQL Server 2000 and displaying it in System.Web.UI.WebControls.Image control. (control name imgPhoto)
byte[] bits = (byte[])cmd.ExecuteScalar();
MemoryStream ms = new MemoryStream(bits);
ms.Write(bits, 0, bits.Length);
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
img.Save(@"C:\1.tmp", ImageFormat.Jpeg);
imgPhoto.ImageUrl = @"C:\1.tmp";
this code is working fine (display the image in image control) when i run this webpart in an ASP application on localhost but when i run this web part on share point it gives me the error "A generic error occured in GDI+." i check the error in try catch statement and it turns out that Image.Save() is generating the error. All the other data from database get displayed without problem.
And here are some things which i already checked..
1) As you know in sharepoint you have to logon with username and password to open the sharepoint page. So if i log on it my username and password i can run the page and even the above code was running fine without any error, but no other user was able to run that webpart.
therefore i change the web.config file and changed the identity tag from
<identity impersonate="true"/>
to
<identity impersonate="false"/>
and after that user can run the webpart but the above code start generating the error as i mentioned above.
2) after changing the identity tag the pages are running with NETWORK SERVICE user id.
3) i do not know that it is a security issue or not as i gave full permission to Everyone and NETWORK SERVICE users on C:\ dive.
4) and one more thing i have changed "trust level" tag in the web.config file from
<trust level="WSS_Minimal" originUrl="" />
to
<trust level="Full" originUrl="" /> just to make sure that security is not a problem
if any Gurus want to have some more information about this problem i can explain..
i describe this error with Image.Save()
i also tried Bitmap.Save("filename",imageFormat.jpeg) and again got the same error
i actually dont know what actually causing this error i spent lots of time googling ..
1)it could be a permission/security problem
2) it could be a memoryStream problem but if i display the image without saveing it it work fine
Bitmap bitmap = new Bitmap(ms);
Page.Response.ContentType = "image/bmp";
bitmap.Save(Page.Response.OutputStream, ImageFormat.Jpeg);
but i want to save that image rather displaying it through Page.Response.OutputStream
i would appreciate if anyone can help as there is no help any where on forums
cheers
Muzaffar Saeed
|
|
|
|
|
If you save over an existing file, and that file has been opened using GDI+, then that can cause this error. The file remains locked until the other bitmap is Disposed.
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 )
|
|
|
|
|
Thanks Christian for ur quick reply
No I am not saving on an existing file i am createing a new file name everytime i run that code, its not a locking issue i am sure as the file name is different everytime
Regards
Muzaffar Saeed
|
|
|
|
|
Hi everyone
Im using c# 2005 and I want to update my access database, it can insert fine and has no errors but just does not update
Here's the code below
string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=datatry.mdb";<br />
OleDbCommand command = new OleDbCommand();<br />
string bhala = "Update Table1 Set CompanyName ='"+txtCompany.Text+"' where CompanyName = '" + txtCompany.Text + "'";<br />
OleDbConnection datatryConn = new OleDbConnection(strConnection);<br />
datatryConn.Open();<br />
OleDbDataAdapter da = new OleDbDataAdapter(bhala, datatryConn);<br />
DataRow r = datatryds.Tables["Table1"].NewRow();<br />
datatryds.Tables["Table1"].Rows.Find(r);<br />
r.BeginEdit();<br />
r["CompanyName"] = txtCompany.Text;<br />
r.EndEdit();<br />
if (datatryds.HasChanges())<br />
{<br />
da.Update(datatryds, "Table1");<br />
datatryds.AcceptChanges();<br />
}<br />
OleDbCommandBuilder objCommandBuilder = new OleDbCommandBuilder(da);<br />
datatryConn.Close();<br />
MessageBox.Show("Updated successfully!");<br />
Thank you
any help is appreciated
csanda
|
|
|
|
|
"Update Table1 Set CompanyName ='"+txtCompany.Text+"' where CompanyName = '" + txtCompany.Text + "'";
I think this won't do anything because you set companyNames with string txtCompany.Text in rows where this name already is.
|
|
|
|
|
As someone else said, this can't work, you need the old name in order to find the right record to update, unless you have a unique Id ( definately a better idea ) to identify the one record you want to change.
Your code is also insecure, you need to read up on SQL injection attacks.
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 )
|
|
|
|
|
I am designing an HR database for a firm the following 3 forms are formed
1 Employee personal
2 Service info
3 Expertise
what will be the best designing procedure for the forms
plz note that thedat will be filled serially 1 2 3
have some one any idea or notes for designing procedure
sas
|
|
|
|
|
I'd imagine that you'd want to create tables for each form, and probably tables for things like areas of expertise, so you can store them as a lookup. As for the forms themselves, I'd imagine if you have a wizard style interface, you may choose to make each form a control, so you can step through them on the one form. Other than that, what exactly are you asking for ?
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 )
|
|
|
|
|
what will be the best designing procedure if the followingis trhe data
emplo
|
|
|
|
|
Could you try rephrasing the question ? It makes no sense right now.
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 )
|
|
|
|
|
Does anyone know the correct syntax for running the TransferSpreadsheet method inside a C# program
The syntax am currently struggling is:
oAccess.DoCmd.TransferSpreadsheet("acExport", 8, "Forms", progpath + @"\XML Database Documentation\Forms.xls", true)
Give me strength, give me caffeine
|
|
|
|
|
What is the TransferSpreadsheet method? What is the oAccess or DoCmd things you're using?
|
|
|
|
|
Try:
oAccess.DoCmd.TransferSpreadsheet(1, 8, "Forms", progpath + @"\XML Database Documentation\Forms.xls", -1)
|
|
|
|
|
does anyone know how to get past a school's firewall? if so please let me know ASAP 'cause i'm trying to check my e-mail and i can't get into the login screen or further. Thnx
SliverHive
|
|
|
|
|
Try using a proxy server such as http://www.cooltunnel.com/
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|