713 Posted Topics
Re: I'm not sure what you are planning to do with this code, as I'm not making any sense out of it, but definately this block of code needs to go : [CODE] With cmd .CommandText = sqlstate .CommandType = CommandType.Text .Connection = con .ExecuteNonQuery() End With cmd = New MySqlCommand(sql_ver, … | |
Re: 192.168.1.20 is not an Internet address, so it has to be the IP your router has assigned to your PC. You need to a) find out what IP your router has (if it's static or if its not you need to see if it supports dynDNS or something similar) and … | |
Re: You can concatenate table name and column name in TheQuery you've used to populate theTables and use that instead. | |
Re: depending on your database you could use a transaction and upon error rollback. If no error was found then you commit the transaction and all changes (inserts in your case) will be "finalized"/made permanent. (In a multiuser environment it can be a pain) If this isn't possible on the db … | |
Re: @jigs28: I'm also confused, but as to what you are doing and what is the problem. Feel free to start a thread of your own and not hijack a totally different issue. As you seem to have problems with your query (AND & OR I'm guessing go to the query) … | |
Re: I guess you should put a breakpoint just before the objConnection.close() and start using messagebox or debug.print to verify the number of records in objDataSet.tables("student") Once you know if you got any results then you'll know where to continue troubleshooting (the connection/db or your datagridview) PS: Check the value of … | |
Re: Happy new year everybody. I'm wishing you all health, prosperity and happiness. Ancient Dragon, enjoy your retirement and post pictures. | |
Re: Ole is not my strong suit - far from it, but I believe that you've destroyed con by [iCODE]con = Nothing[/iCODE] and then you try to use it again. Try commenting out this line of code and try again or declare con all over again for the cmbProduct_SelectedIndexChanged sub. | |
Re: I'm guessing you mean the function GetCustomer reads a file and returns 5 fields and x number of records, as the class will only hold functions or subs. I'm a bit confussed as the function has a non-optional customernumber as parameter so it should return only 1 record or am … | |
Re: Loop through the sheets and do the same for all of them. | |
Re: I preffer to use joins, so here's a possible solution: [CODE]select T0.ItemCode, T0.Quantity, sum(T0.Quantity) OVER(PARTITION BY T2.U_ItemCode) as 'SUM' FROM RDN1 T0 inner join MET_OBOM T1 on T0.ItemCode = T1.ItemCode INNER JOIN MET_BOM1 T2 ON T1.DocEntry = T2.DocEntry WHERE T2.U_ItemCode = '30-05-618XD' ORDER BY T1.DocEntry ASC [/CODE] I haven't tested … | |
Re: [QUOTE=The Dude;1694774]Yes im thankful it isnt,i must have been caught up in David's spam trap (Which must look @ guest browsing of the site)[/QUOTE] Bye bye quick reply, hello silly question. PS: The random question I got for this post is "Are you human?". If no isn't the correct answer … | |
Re: In your other thread you are asking how to save firefox documents to txt files. Are these 2 related? Can you explain what you are doing? | |
Re: I don't think you got the point of showing what you've done so far / or have read the member rules. Reverend Jim is asking for your source code, as this forum's goal is not to provide ready-made build-to-order programs, but help fellow programmers (by hobby, class or profession). The … | |
Re: Like noamwegner says, use profiler to get a trace. You can limit what the trace will record with client workstation, so you can use it with production or test environments. | |
Re: When the output is text you can run your query like this: [CODE]select Col1 + ' ' + Col2 from test[/CODE] If the output is grid then you will see "Arun Kumar". If that doesn't work for you then you need to: [CODE]select Col1 + CHAR(13) + CHAR(10) + Col2 … | |
Re: as the error suggests your datagridview doesn't have a column named startdate and a column named enddate. You should change the filter to match the columns you want to filter: [CODE]dv.RowFilter="your_column_here>='" + dateTimepicker1.value + "' and your_column_here<='" + dateTimepicker2.value + "'"[/CODE] You can use 2 columns like adatapost's sample or … | |
Re: Why use temp table and especially why use trigger? [CODE] update shopcart set Discount = (SubTotal + Tax + ShipCharge) * 0.1 , Total = (SubTotal + Tax + ShipCharge) - ((SubTotal + Tax + ShipCharge) * 0.1) from shopcart a inner join shopper b on a.shopperid = b.shopperid inner … | |
Re: This is an old thread, I'm guessing that OP found answer already. Anyway the answer is that since we are talking about trigger then the OP can use DELETED and INSERTED to figure out the old and the new records when updating or INSERTED for new records when inserting and … | |
Re: This article: [url]http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/d199eb76-7eea-40ef-afe6-7e0dee6b7015/[/url] recommends the usage of sp_attach_single_file_db to attach the mdf to somebody with the same error, but different cause. It seems that it's either a corrupted mdf or that you are missing the ldf (log file). You might want to try to recover the log file as well … | |
Re: You start by getting a list with valid users and for each user in the list show a different image (also a label with the username would be nice, just for when the users have the same image). I think that I've seen a couple of examples in here about … | |
Re: I agree with GeekByChoice in both that waqasaslammeo's answer is rubish and that you need to run your SQL query against db and verify that it's working as expected before troubleshooting anything else. May I suggest the Debug.Print (SQL) instead of msgbox? I find it very usefull to get the … | |
Re: Here's a tutorial: [url]http://www.dreamincode.net/forums/topic/88605-the-background-worker/[/url] and here is another: [url]http://www.dotnetperls.com/backgroundworker-vbnet[/url] They both have sample code. Try it out and post your code if you run into problems. Good luck | |
Re: The easiest way would be to pass from the search form to the edit form a datatable as a parameter when you load it and have the edit form on load populate the appropriate fields from the datatable. | |
Re: I've never used it, but I bet that if you use the "Run as a different user" option you can get authenticated with an AD account other than the one currently logged in. To find the option hold Ctrl+Shift and right click the shortcut/exe | |
Re: use [ICODE]select getdate() [/ICODE] on SQL and executescalar to get the value. Assign the value to a var and use it in statusstrip or wherever. I'm not sure what you are doing with the timer control though. PS: Why does it has to be the SQL date/time and not the … | |
Re: I'm sorry to inform you, but your post has to be one of the most vague ones in the whole internet. Can you please inform us what you need help with? And then provide some relative info (the code with problem would be nice). | |
Re: You can write the create table statement as a string, concatenating or adding as a parameter the name "gerry" where appropriate and then execute it as a nonquery from VB or send the specs to a sproc in SQL that will do the same and use [ICODE]exec(string)[/ICODE] to get the … | |
Re: We'll probably need to see some code, but sounds like you are using a datatable (or dataset) for your queries and you are not updating/inserting/deleting the data you've changed in the database. | |
Re: Can you please explain what you mean by [QUOTE]This only happens when i move to a new area[/QUOTE] and [QUOTE]it looses the Location Where it is saved[/QUOTE] ? | |
Re: I think that you need to change [CODE]Console.ReadLine()[/CODE] to [CODE]uservalue = Console.ReadLine()[/CODE], | |
Re: I don't see how the compiler fits in this, as it's only used during creation and not execution (vs interpreter who is invoked at run-time). I've seen an article about it, but was more about what to place in a loop and what not to or where to use vars/constants … | |
Re: This might not be the best solution, but if you don't find anything better: [CODE] years.Text = DateDiff(DateInterval.Year, Start.Value, _End.Value) months.Text = DateDiff(DateInterval.Month, _ DateAdd(DateInterval.Year, CInt(years.Text), Start.Value), _End.Value) days.Text = DateDiff(DateInterval.Day, _ DateAdd(DateInterval.Month, CInt(months.Text), _ DateAdd(DateInterval.Year, CInt(years.Text), Start.Value)), _End.Value) hours.Text = DateDiff(DateInterval.Hour, _ DateAdd(DateInterval.Day, CInt(days.Text), _ DateAdd(DateInterval.Month, CInt(months.Text), _ DateAdd(DateInterval.Year, … | |
Re: Friend you are not giving us enough clues to help you. We'll need a better understanding of what you mean password change while the form is executing. Also we'll need to see some code in order to give you a solution that matches your code (apart from showing effort). ie … | |
Re: You can't - or to be exact you can use a dictionary and verify the words between spaces against that, but it's suicidal just to think of it so you can't. You can count the number of spaces and compare it to the length of the whole string, but you … | |
Re: @Reverend Jim: It won't be much of a lock if the user doesn't have a password setup. @OP: Reverend Jim's solution is your best bet if you want to lock the OS and not just your app. You just have to make sure the current user has a password setup, … | |
Re: I've commented just now on the same topic, so read here: [url]http://www.daniweb.com/software-development/vbnet/threads/400782[/url] | |
Re: @OP: No, your design doesn't make any sense at all. pritaeas has a valid point, but there is also the issue of having the same info on 2 different fields which will make your life difficult in the following steps. Although you didn't explain what this is about, I can't … | |
Re: I'd say leave the autonumber out of the insert, but without any code it's just a wild guss. PS: I don't understand why you have to do all this for a simple [ICODE]User_nameTextBox.Text = usrName[/ICODE]. Worst case scenario use [ICODE]User_nameTextBox.Text = usrName.tostring[/ICODE]. | |
Re: You don't want to read a file from multiple folders, just to read a file and populate the appropriate textboxes. According to your specs there is only 1 file per directory and that is the userinfo.txt. Since you are not giving any specs for the file itself read here: [url]http://www.daniweb.com/software-development/vbnet/threads/134617[/url] … | |
Re: Is the ID unique per record or is it some sort of identifier to group your records by or link them to users, etc? I'm guessing it's not, so you need to change the criteria so you end up with the correct and unique record. Try a select and keep … | |
Re: I think that the example with the login form isn't the best, as most require the username to be cleared as a security measure (so you need a valid username AND the correct password). Anyway a simple and good enough solution is My.settings Read about it here: [url]http://www.daniweb.com/software-development/vbnet/code/296812[/url] or here: … | |
Re: I'm guessing you are talking about Access. If you are creating a one table/one function db then you might not need many forms, but if you are creating a database with more than 1 tables then you might need 1 for each table and a couple more for joining the … | |
Re: [CODE]Select articlenb , productcode, sum(amount) from article group by productcode order by productcode[/CODE] | |
Re: Since you are only changing 1 field for 1 record, wouldn't it be easier and cleaner to just go ahead and update instead of using datasets? [CODE]dbprovider = "Provider=Microsoft.ACE.OLEDB.12.0;" dbsource = "Data Source=|DataDirectory|\Ex_m.accdb;" & "Persist Security Info=True;" & "Jet OLEDB:Database Password=123456" con.ConnectionString = dbprovider & dbsource Dim ds As New … | |
Re: You need to change your code to something like: [CODE]obcon.cmd.CommandText = " select id, f_name + ' ' + m_name + ' ' + l_name as 'name' from contact where type='" & ledcmbsrctype.Text & "'" obcon.con.Open() Dim dr As SqlDataReader dr = obcon.cmd.ExecuteReader ledcmbsrcitem.valuemember = "id" ledcmbsrcitem.displaymember = "name" While … | |
Re: First of all the basic cost doesn't change, so it doesn't have to be in an if statement. What needs to go in that if statement is if you are adding the adult or the senior cost to the membership. I'm assuming that this is an exercise for IFs, so … | |
Re: Yes it's possible. I might be easier to do and possibly use it with VBA from Excel, but it is possible to do it with VB.Net. | |
Re: [QUOTE=cwarn23;1695038]I see some resemblance there. Make Michael Jordan white than add some glasses on his face and you got yourself a very fit Bill Gates.[/QUOTE] Nope, nothing. |
The End.