5,346 Posted Topics
Re: [B]>>Parametrized query[/B] [code] /* SQL Connection and Modification with real examples */ /*********/ using System.Data.SqlClient; /*********/ //SQL connection string /***** Data Source = YourServerName\\DataBaseInstance Initial Catalog = TheDatabaseName Integrated Security = SSPI (uses current logon credentials to authenticate with Database Server) ******/ string cs = "Data Source=REG-PENTREE1\\SQLEXPRESS;Initial Catalog=reg_checkout;Integrated Security=SSPI"; //Create … | |
Re: [B][URL="http://msdn.microsoft.com/en-us/library/ms161953.aspx"]Suggestion[/URL]: Don't use SQL query by concatenating hard-coded strings together with a string entered by the user[/B]. [URL="http://en.wikipedia.org/wiki/SQL_injection"]Sql Injection.[/URL] | |
Re: [b]>I call both of them from another thread using Invoke.[/b] It's illegal to call a method or property on a control from any thread other than the one that created it. All cross-thread calls must be explicitly marshalled to the thread that created the control, using the Control. Use Invoke … | |
Re: Welcome donnybrasco. We appreciate your help. Have you ever noticed that the current thread is two years old? Please do not resurrect old threads. Have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] | |
Re: Welcome. [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"][B] Read the forum rules[/B][/URL]. You need to show effort, and what better way than posting the code that you have tried so far? [URL="http://www.daniweb.com/forums/announcement61-2.html"]We only give homework help to those who show effort[/URL] | |
Re: [QUOTE=SciFiCoder;1250491]So use the explicit .Close() method? I was reading about the Using statement: [code=C#] Using(StreamWriter sw = new StreamWriter(path)){ statement; } [/code] Is this better to use in my case, or only when there is a lot more code and more streams to deal with? Thanks for any help.[/QUOTE] Since … | |
Re: [B]Kenny>>One step at a time and you'll be fine. [/B] Excellent Kenny! @ajwei810192 - Please mark this thread as solved if you have found an answer to your question and good luck! | |
Re: [QUOTE=deeptakshd;1250991]I m having a webpage(reminder.aspx) in which i need 2 select some date and enter some message ...and message should be displayed on home page(home.aspx)[/QUOTE] Which part of program/code is not running correctly at your side? Please show us your code. | |
Re: Double Thread - [url]http://www.daniweb.com/forums/thread289943.html[/url] Thread Locked. [QUOTE=ariez88;1250851]Thanx ... the thing is all clear but can u provide any link(coding in C#) which uses FileSystemWatcher on windowsapplication, storing in a DataBase and webapplication retrives it ??? or Is there any class analogous to FileSystemWatcher which directly supports WebApplication (ASP.NET) ????[/QUOTE] Have … | |
Re: I'm glad you got it helpful. Please do not resurrect old threads. If you have any questions please ask. You are welcome to start your own threads. Have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] Thread Closed. | |
Re: @judithSampathwa. Do not flood the forum by posting the same question more than once (ie in multiple forums). Do not piggyback threads (aka "hijack" threads) by posting your question as a reply to another question. [B]Thread Locked.[/B] | |
Re: [QUOTE=Mikey12345;1250345]Hi I would like to write a simple public void function that will allow me to divide datagridview.rows[i].cells[0].value with datagridview.rows[i-1].cells[0].value. How can i loop this in the function. thanks[/QUOTE] Show us your code work. | |
Re: [QUOTE=sdhawan;1250428]do anyone knw how can i store an array in a string and insert that string in databse.So supose if i have string with values a,b,c ,d.... etc i dont want each value in different row of databse table, i want them ina single row.Can anyone help me with this[/QUOTE] … | |
Re: Welcome FutureGamer. We appreciate your help. Have you ever noticed that the current thread is two years old? Please do not resurrect old threads. Have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] | |
Re: Learn/use TcpListener, TcpClient classes from System.Net.Sockets namespace. | |
| |
Re: You need to handle ItemCommand event of DataList. | |
Re: [QUOTE=Duki;1248089]Hey Guys, I have a tabpage on my form, and I want to populate it according to which fields are set in a database. For example, I want tab#1 to list database fields of all items that have a particular field set to True. I want tab#2 to list the … | |
Re: [B]order[/B] is reserved word (say order by clause). [code] double price = 12,55; mySelectQuery = "INSERT INTO `order` (`total`)" + "VALUES (" + price+ ");"; [/code] | |
| |
Re: [QUOTE=shuhana84;1247383]hi,i want to know how to export sql server 2005 database to access through vb.net coding..no need to select n insert table one by one,just save package...[/QUOTE] Read this article - [url]http://www.databasedesign-resource.com/import-and-export-in-sql-server.html[/url] | |
Re: Do not hijack another thread to ask your question but start your own thread instead. Please read the rules before posting again - [url]http://www.daniweb.com/forums/thread78223.html[/url] and [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. [B]Thread Closed.[/B] | |
Re: Please do not resurrect threads that are years old. By doing so you run the risk of confusing current posters. If you want to ask question, start your own thread. [B]Thread Locked.[/B] | |
Re: Have a look at this article - [url]http://www.functionx.com/vcsharp/xml/Lesson06.htm[/url] | |
Re: [URL="http://htmlagilitypack.codeplex.com/wikipage?title=Examples&referringTitle=Home"]Parse [/URL]HTML and then populate the treeview. | |
Re: [QUOTE=onlinessp;1248135]Hi, Any one tell me how i can find that which files is changing it's behavior or or want to run. Thanks on your Comments[/QUOTE] Programs (files). | |
Re: I think method [B]main_Form_Load[/B] is not attached with [B]Load[/B] event. Please verify [B]Load[/B] event and [B]Load event handler[/B]. | |
Re: prabhakaranmca. Please do not resurrect threads that are years old. By doing so you run the risk of confusing current posters. Do not hijack another thread to ask your question but start your own thread instead. Please read the rules before posting again - [url]http://www.daniweb.com/forums/thread78223.html[/url] and [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. [B]Thread Locked.[/B] | |
Re: Hi discovery_power. You cannot hijack another thread to ask your question but you have to start your own thread instead. Please do not resurrect old threads. Have a look at forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]rules[/URL]. Please read before posting - [url]http://www.daniweb.com/forums/thread78223.html[/url] [B]Thread Locked.[/B] | |
Re: No need of loop. [code] da.Fill(dt_PropertyType); cmb_PropertyType.DataSource = dt_PropertyType; cmb_PropertyType.DisplayMember = "typename"; cmb_PropertyType.ValueMember = "propertytypeid"; [/code] and use [B]SelectedValue[/B] property (see Post #2). | |
Re: [QUOTE=madhan;1247264]string s = "true"; string w = "false"; Console.Write(s +"\r"+w); output:false I don't understand how \r works. why is the true missed? please explain .[/QUOTE] Value "true" is replaced by "false". [code] string s = "true"; string w = "fa"; Console.Write(s + "\r" + w); //output will be "faue" Console.Read(); … | |
Re: [QUOTE=GAME;1245270]How would I be able to make a child form come to front on a button click?[/QUOTE] Trick. [code] private void button1_Click(object sender, EventArgs e) { Form2 s = new Form2(); s.MdiParent = this; button1.SendToBack(); s.Show(); } private void Form1_Load(object sender, EventArgs e) { this.MdiChildActivate += new EventHandler(Form1_MdiChildActivate); } void … | |
Re: [QUOTE=wlalth;1242017]Hi. I need to get unique information of runnig programs. I dont want to get ProcessName or MainWindowTitle. Because im working on anti-cheat program. Im tried lot of method of GetProcess() but any of them give me the uniq. information. So is it possible to get uniq data of running … | |
Re: Have a look at this link - [url]http://www.daniweb.com/forums/post1128647.html#post1128647[/url] | |
Re: [b]>what is the way to get out of it so that my application can proceed further.[/b] Text from MSDN - [url]http://msdn.microsoft.com/en-us/library/system.gc.waitforpendingfinalizers.aspx[/url] [QUOTE] SUMMARY: The thread on which finalizers are run is unspecified, so there is no guarantee that this method will terminate. However, this thread can be interrupted by another … | |
Re: Welcome. You may start to learn/use classes from System.IO namespace. | |
Re: Your database file is read-only. | |
Re: File Menu + Open Project + Select solution file (.sln) or project (.csproj) | |
Re: See. 1.[url]http://www.dynamicdrive.com/forums/showthread.php?t=28027[/url] 2.[url]http://www.dynamicdrive.com/forums/showthread.php?t=44601[/url] | |
Re: [QUOTE=sureshrajanmca;1244036]cannot close the page in mozilla, so i set dom.allow_scripts_to_close_windows true manually. then i used window.close() its works fine. my problem is, i want to set dom.allow_scripts_to_close_windows enable true automatically using javascript code, its possible are not?[/QUOTE] Read - [URL="http://www.mozilla.org/projects/security/components/signed-scripts.html"]Signed script[/URL]. | |
Re: Date is a VB.NET reserved name. [code] Dim date1 As XmlNode = title.NextSibling Dim dateAttribute As XmlAttribute = date1.Attributes("added") SongNodesOut.Text &="<br/>" & dateAttribute.Value) [/code] | |
Re: Maybe you want do this, [code] foreach (DataRow dr in ds.Tables["DEPTS"].Rows) { TreeNode tn = new TreeNode(dr["DEPTSHORT"].ToString()); foreach (DataRow drGroup in dr.GetChildRows("Depts_Group")) { TreeNode tnn = new TreeNode(drGroup["PGRPSHORT"].ToString()); foreach (DataRow drProduct in [COLOR="Red"]drGroup.GetChildRows[/COLOR]("Group_Product")) { TreeNode tnnn = new TreeNode(drProduct["PRODSHORT"].ToString()); foreach (DataRow drBarcode in [COLOR="Red"]drProduct.GetChildRows[/COLOR]("Product_Barcode")) { tnnn.Nodes.Add(drBarcode["barcode"].ToString()); } tnn.Nodes.Add(tnnn); } tn.Nodes.Add(tnn); … | |
Re: [code] dataAdapter.DeleteCommand=conn.CreateCommand(); dataAdapter.DeleteCommand.CommandText="DELETE FROM article WHERE artId=@artId"; dataAdapter.DeleteCommand.Parameters.Add("@artId",SqlDbType.Char,10); [/code] | |
Re: Hi chibex64. Please do not resurrect threads that are years old. By doing so you run the risk of confusing current posters. If you have any questions please ask. You are welcome to start your own threads. For easy readability, always wrap programming code within posts in CODE **Thread Closed.** | |
Re: [QUOTE=onlinessp;1244311]i want to make a program which take input a user name an generate a unique code for it. all this process should be using text box text change[/QUOTE] Use GetHashCode() method. [code] string s = "Hello"; int code=s.GetHashCode(); [/code] | |
Re: [QUOTE=shahrukh90;1243724]In windows based programming there is some confusion about the data grid and data binding. What to do first and where to do in code?[/QUOTE] Must read articles: 1. [url]http://www.codeguru.com/csharp/.net/net_data/datagrid/article.php/c13041[/url] 2. [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx[/url] 3. [url]http://msdn.microsoft.com/en-us/library/e0ywh3cz.aspx[/url] | |
Re: sweetsasthi, I think one should have to follow these: 1. Involved yourlself with the subject of software (project). 2. Time management 3. Record data, information, questionarries 4. Document project profile. 5. Identify inputs & outputs 6. Design database schema. | |
Re: You should have to look at this article - [url]http://www.codeproject.com/KB/cs/SendKeys.aspx[/url] | |
Re: Hi, You have to make some changes to in order to overcome this problem. Take a look at this thread - [url]http://stackoverflow.com/questions/2727688/how-to-set-the-windows-screen-resolution-using-c-windows-application[/url] and [URL="http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=e49820cb-954d-45ae-9cb3-1b9e8ea7fe8c"]Windows User Experience Interaction Guidelines[/URL] | |
Re: Correction: [code] PurchaseSql = "Select * from PUrchase where PurchaseDate =[COLOR="Red"]'[/COLOR]" & DatePurchaseFrm.Value & "[COLOR="Red"]'[/COLOR] order By PUrchaseID" [/code] Advice: Try to use parametrized query. [code] PurchaseSql = "Select * from PUrchase where PurchaseDate =@purdate order By PUrchaseID" [/code] |
The End.