|
If you want a meaningful response, you're going to have to be a lot more specific.
What exception are you getting? What line is triggering it? What query are you sending?
We're programmers, not psychics.
|
|
|
|
|
no exception is caught
insert query is
String query = "insert into mydb values('" + textBox1.Text + "','" + textBox2.Text + "')";
This code was posted by me...
|
|
|
|
|
Good Day Vivek
Today was a long day, and seing this kind of post in the forums bores me to death. First of all when you post something here on codeproject you must use the pre tags so that the code will be formated well and it can differ from your message. secondly we cant know the problem until we see what is contained in the variable "query" , and another thing there is a bad coding practise in your code, you start returning without closing the connection.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
i don feel that pasting the code for close is necessary....
This code was posted by me...
|
|
|
|
|
Then i cant help
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
no need tnx
This code was posted by me...
|
|
|
|
|
Vivek Vijayan wrote: i don feel that pasting the code for close is necessary....
Your right, it is not necessary... when you provide a better description of what the problem is. But as everyone is having to guess how bad your code is, people are going to ask questions.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
this community is for helping not for findng mistakes only
This code was posted by me...
|
|
|
|
|
Vivek Vijayan wrote: this community is for helping not for findng mistakes only
Finding mistakes is helping
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I would say you have a compile error for no catch/finally block but that's the best I can give you for the example you have shown...
Oh, no wait... it's coming to me... 'the.. answer.. is.. .. ..' ..Damn, lost it!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
if i am writing code for try{}
i know how to write catch and finally
tnx
This code was posted by me...
|
|
|
|
|
Vivek Vijayan wrote: if i am writing code for try{}
i know how to write catch and finally
Er... Where is the logic in that?
you are writing code for database insert but that evidently does not mean you know how to write it
And it's a good example of why your need to make your example better in order to get a good response - you didn't put the catch/finally in your example so how do I know that is not your error?!
Hmmm... a little thought can go a long way.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
To get the path of your executable:
System.Reflection.Assembly.GetEntryAssembly().Location
Then just get the directory with System.IO.Path.GetDirectoryName(), and use System.IO.Path.Combine() to tack on the PDF filename.
(Better to use System.IO.Path than string parsing, to make sure it'll work regardless of the location... forward slashes / backslashes, etc)
|
|
|
|
|
Use the code below. Application.StartupPath gives you the path of executable
Process.Start(Application.StartupPath + @"\sample.pdf");
|
|
|
|
|
Or you could try this: (assuming the PDF file will always be in the same directory as your application executable)
Process.Start(Environment.CurrentDirectory + @"\file.pdf");
Hope this helps.
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
i have devloped windows application
i want to create linces key
and user should enter key while setup
and also how do i specify the duration like trial version for 1 month
|
|
|
|
|
Licensing systems are a little more complicated than just setting a few properties, unfortunately...
A couple quick searches, and I found an article here on CP that might help you:
Using XML Digital Signatures for Application Licensing[^]
If that's too advanced, you might be better off going with a third-party solution... There are some out there... Just google for "C# licensing system"
|
|
|
|
|
im having a hard time coding a simple calculaor especially on its buttons function.everyone willing to help me?...tanx!looking forward to your help.
|
|
|
|
|
So what about your homework project specifically are you having a hard time with?
|
|
|
|
|
Can you be more specific about the problems you are having. I'm sure then people are more pleased to help.
I think you should not expect someone to do all the job for you.
|
|
|
|
|
Search the articles; there are all too many simple calculator articles here.
|
|
|
|
|
Hi
i want to inject code into .net assemblies. for this, i found some useful tools such as Reflexil that can some changes to an assemblies limited, but u can not add more class or change an existing properties of that assemblies.
Is there any better tool or way to accomplish this ?
thanks
|
|
|
|
|
What is your intent? I am asking you since you have went to extremes like Reflexil.
|
|
|
|
|
i want to analysis some our applications and it's security leveles.
i don't want to make virus, .... it's only for testing.
if u can't help me, plz don't post
|
|
|
|