- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
24 Posted Topics
Re: Hi! One possibility is, that you do an other sql-statement where you try to select the desired ProduktID: [CODE] string sqlString = "Select ProductID FROM Product where ProductID="+txtProductID.Text; OleDbCommand dbCmd = new OleDbCommand(sqlString, mDB); mDB.Open(); OleDbDataReader reader = dbCmd.ExecuteReader(); if (reader.Read()) { MessageBox.Show("ID exixst"); } else { // do something … | |
Re: hi! i think the better way is, that you use a second thread. - one for the GUI - one for the worker in the worker-thread ( maybe you will use a backgroundwoker ) you will do your time-consuming action and "invoke" the progressbar/label to do your GUI-action. In your … | |
Re: Hi! have you checked if the listBox2 really have items? because in your code i only see you set for listBox1 the DataSource, but i can't see where you fill your listBox2. Maybe it is a typo and you should use listBox1 instead? mybe its a hint for your problem … | |
Re: Hi! the error in your posted codeline is, that there are to much closing braces }} try this: [code] return (string.Format("{0:##-00-000-00W0}", Convert.ToInt32(wellLocation))); [/code] hope this helps Daniel | |
Re: hi! try this link [URL="http://support.microsoft.com/?scid=kb%3Ben-us%3B304662&x=11&y=14"]http://support.microsoft.com/?scid=kb%3Ben-us%3B304662&x=11&y=14[/URL] one option is, that you include the web-browser-ocx and open the power-point-file. you also can use a free powerpoint-activeX [URL="http://www.daolnwod.com/free-powerpoint-viewer-activex.html"]http://www.daolnwod.com/free-powerpoint-viewer-activex.html[/URL] the third way: [URL="http://blogs.msdn.com/erikaehrli/archive/2005/08/26/hostofficeinnet.aspx"]http://blogs.msdn.com/erikaehrli/archive/2005/08/26/hostofficeinnet.aspx[/URL] download for dsoFramer: [URL="http://download.cnet.com/Microsoft-Developer-Support-Office-Framer-Control-Sample-KB-311765/3000-2206_4-10732960.html"]http://download.cnet.com/Microsoft-Developer-Support-Office-Framer-Control-Sample-KB-311765/3000-2206_4-10732960.html[/URL] i hope this will help you Daniel | |
Re: hi! try this link -> there you can find several tutorials for game-programming with .net [url]http://www.c-sharpcorner.com/Articles/ArticleListing.aspx?SectionID=1&SubSectionID=65[/url] Daniel | |
Re: hi! try this: [CODE] string oldfilename = openfiledlg.Filename // e.g. c:/test/test.bmp - name from your opendialog string newfilename = Path.Combine(Application.StartupPath,Path.GetFileName(oldfilename )); File.Copy(oldfilename ,newfilename); [/CODE] i hope there are no typing -errors :) Daniel | |
Re: hi! please post your Exception text! I think the problem is your column-name "Dog Name" try [] around your column-name -> [CODE=sql]"INSERT INTO dogs([Dog Name], [Breed]) VALUES('NewName', 'NewBreed')";[/CODE] hope this helps Daniel | |
Re: hi! take a look on : [url]http://knab.ws/blog/index.php?/archives/3-CSV-file-parser-and-writer-in-C-Part-1.html[/url] [url]http://knab.ws/blog/index.php?/archives/10-CSV-file-parser-and-writer-in-C-Part-2.html[/url] [url]http://www.codeproject.com/KB/database/CsvReader.aspx[/url] or you can try this (with a regular expression): [CODE] private String[] LineToArray(String line) { String pattern = ",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))"; Regex r = new Regex(pattern); return r.Split(line); } [/CODE] Daniel | |
Re: please post the errors -> (or/and) code where error occurs. without, we can't help you. Daniel | |
Re: hi! First of all: what do you mean with matrix? For me, a matrix is int [][] and not int [] (this is for me a vector). And in this line: this is only the addition of two values from the vector. [QUOTE] for (i = 0; i <= 10; … | |
Re: hi! I don't know if you solved this issue -> a small hint :) try this for your substraction [CODE] total += one - two; if (total >0) { onesCol = total; total =0; } else onesCol= total + 10; //push 'onesCol' onto result stack result.push(onesCol); [/CODE] Daniel | |
Re: Hi! I don't know if you have already solved his issue, but like "nezachem" (a small hint :) )there is a typing-error in the line! Daniel | |
Re: hi! two more links :) [url]http://www.intap.net/~drw/cpp/[/url] [url]http://www.codersource.net/codersource_cppprogramming.html[/url] Daniel | |
Re: hi! First: you must execute the sql-Command for each row! Second: you parameter-collection will have duplicate parameter-names -> you are adding for each part of the line (in your case 4 parts) the same names. [QUOTE] foreach (string part in parts) { cmd.CommandText = "Insert into BankDetails values(@acc,@nm,@ag,@bal)"; cmd.Parameters.Add("@acc", SqlDbType.NVarChar).Value … | |
Re: hi! I don't know it exactly, but if the column "EngrMultiplier" is used as foreign-key (constraints) in other tables, this error can occure. Be sure, that the column you want to modify is not used as foreign-key! if column is a foreign-key, remove all constraints using this column, change datatype … | |
Re: Hi! you can validate the input with an regular Expression if its valid or not -> you can also display a information if Input is wrong -> see this link: [url]http://www.codeproject.com/KB/edit/RegExTextbox.aspx[/url] There the textbox is validated against a regular expression you maybe need one of the following expressions: [url]http://regexlib.com/Search.aspx?k=&c=5&m=-1&ps=20[/url] hope … | |
Re: hi! try this -> String*newText; newText = new String(oldCharStarString); Daniel | |
Re: Hi! first of all do you need the key? because you can also iterate over all values: [CODE] int count = 0; foreach ( List<T> edges in adjacencyMap.Values) { count += edges.Count; } return count; [/CODE] or if you need also the key: [CODE] int count = 0; foreach (object … | |
Re: Hi! It does not matter, what kind of database you are using. With the correct ConnectionString and the Correct Database Provider you can connect to each kind of database (oracle,access,Sql-Server (2005,20008),.....) A lot of connection-Strings are listed here: [url]http://www.connectionstrings.com/[/url] And a short C#-Example connecting to DB with a connectionString: [url]http://csharpcomputing.com/Tutorials/Lesson17.htm[/url] … | |
Re: Hello! have you tried google? here some examples: 1) look into msdn 2) [url]http://csharpcomputing.com/Tutorials/Lesson17.htm[/url] 3) [url]http://en.csharp-online.net/Database_Articles[/url] Daniel | |
Re: Hi! a simple code for opening a Database-connection [CODE] OleDbConnection myConn = new OleDbConnection ( ); try { myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=myData.mdb"; myConn.Open ( ); //do something here } catch (Exception ex) { // do exception-handling } finally { myConn.Close(); } [/CODE] i hope this helps | |
Re: Hello! You forgot to update the SqlDataAdapter -> an example from MSDN [CODE] public DataSet CreateCmdsAndUpdate(string connectionString, string queryString) { using (OleDbConnection connection = new OleDbConnection(connectionString)) { OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = new OleDbCommand(queryString, connection); OleDbCommandBuilder builder = new OleDbCommandBuilder(adapter); connection.Open(); DataSet customers = new DataSet(); adapter.Fill(customers); //code … | |
Re: i dont know, how many columns your table have, but normally you should write sql-statement like this: insert into incomeexp (year,month,data,bal,inc_exp) values (@year,@month,@data,@bal,@inc_exp) Otherwise the order and the amount of table-columns and values must be the same. And the previous-poster already mentioned: the error-message is always helpfull!! i hope this … |
The End.