|
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.
|
|
|
|
|
I'm sorry to say, but it didin't work for some reason. I think i need some kind of password to override the firewall. so if any body knows anything let me know please THNX
|
|
|
|
|
What is it about a forum to do with asnwering questions on C# that made you think we were likely to answer a question on evading your school's security policy?
|
|
|
|
|
I dont know! This is my first time on this website so, i didn't know which topic to click on! SORRY!!!!!!!!!!!!!!!
|
|
|
|
|
Ok let me rephrase then:
what was it about a website devoted to programming for the windows platform that made you think here was a good website to ask?
Seriously, you shouldnt be doing this - and certainly not just to check your email. Wait till you get home from school and use your PC at home or failing that im sure there's an internet cafe somewhere near your house.
We don't discuss hacking here. There are whole websites devoted to it if you really want to find out more!
|
|
|
|
|
O.k. Sorry if i bothered anybody. can we just forget this ever happened? So, what exactly is this site all about 'cause it got recommened to me by a friend & they said i'd be interested in it but i don't know anything 'bout this site. so, can anyone fill me in please? THNX
|
|
|
|
|
Take a look around the site at the articles and the forums. This site is dedicated to developing software.
The reaction you got was because you made the basic mistake of not posting your question in the right forum, which is a big no-no (as you found out). Things became heated because somebody else jumped into the thread to try and criticise members for pointing this out - those of us that he tried to have a go at have been members of this site for a very long time, some are even MVPs, and we are a pretty tight crowd, so things got ugly quickly. Still, when all is said and done, welcome aboard and I hope that this little incident doesn't put you off one of the most vibrant places on the web.
Oh, if you are ever unsure of posting etiquette on the site, this[^] might help.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
People come here looking for information, if you have the knowledge just give people it.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
So, following your logic, the forums should just be a free for all. They are purposely divided so that people with appropriate skills can help without needing to wade through mountains of irrelevant topics.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Give over
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Nope - the forums have a particular etiquette, and this should be followed by ALL users. See the very first topic in this[^] article.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
So you would deny someone an answer because they are in the wrong forum? Thats pathetic, it's because of people like you that people like me can't find their answers. Give the guy a break it's not like he wants to break the firewall to look up porn!
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|