713 Posted Topics

Member Avatar for PF2G

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, …

Member Avatar for adam_k
0
124
Member Avatar for geoamins2

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 …

Member Avatar for geoamins2
0
324
Member Avatar for Wolxhound90

You can concatenate table name and column name in TheQuery you've used to populate theTables and use that instead.

Member Avatar for Wolxhound90
0
195
Member Avatar for jbutardo

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 …

Member Avatar for adam_k
0
547
Member Avatar for Jigs28

@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) …

Member Avatar for M.Waqas Aslam
0
215
Member Avatar for deolalkar_pooja

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 …

Member Avatar for adam_k
0
189
Member Avatar for Ancient Dragon

Happy new year everybody. I'm wishing you all health, prosperity and happiness. Ancient Dragon, enjoy your retirement and post pictures.

Member Avatar for The Dude
4
180
Member Avatar for Hawk123

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.

Member Avatar for poojavb
0
238
Member Avatar for raygunpunx

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 …

Member Avatar for raygunpunx
0
128
Member Avatar for mak_anthony

Hello, first of all this is the MS SQL part of the forum, so you might get a better solution if you post in the MySQL. Secondly I would like to warn you that quite often it can be very dangerous to use a stored procedure to delete from tables. …

Member Avatar for adam_k
0
101
Member Avatar for kothaisaravan
Member Avatar for SimpleByDesign

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 …

Member Avatar for adam_k
0
218
Member Avatar for happygeek

[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 …

Member Avatar for Dani
2
1K
Member Avatar for Pepdeal

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?

Member Avatar for caperjack
0
1K
Member Avatar for leutrim

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 …

Member Avatar for adam_k
0
334
Member Avatar for jbisono

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.

Member Avatar for jbisono
0
164
Member Avatar for Arjun_Sarankulu

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 …

Member Avatar for Arjun_Sarankulu
0
281
Member Avatar for vijaycare

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 …

Member Avatar for M.Waqas Aslam
0
2K
Member Avatar for samuel_1991

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 …

Member Avatar for noamwegner
0
284
Member Avatar for Tank50

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 …

Member Avatar for adam_k
0
127
Member Avatar for ejazmusavi

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 …

Member Avatar for adam_k
0
150
Member Avatar for NewUserVB.Net

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 …

Member Avatar for codeorder
0
175
Member Avatar for archelle

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 …

Member Avatar for adam_k
0
211
Member Avatar for markdean.expres

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

Member Avatar for markdean.expres
0
107
Member Avatar for ajkva

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.

Member Avatar for M.Waqas Aslam
0
132
Member Avatar for SimpleMan78

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

Member Avatar for SimpleMan78
0
120
Member Avatar for adnysam

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 …

Member Avatar for adnysam
0
167
Member Avatar for shivya jain

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).

Member Avatar for hericles
-1
107
Member Avatar for gerchi152

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 …

Member Avatar for adam_k
0
200
Member Avatar for deceivingrakesh

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.

Member Avatar for adam_k
0
92
Member Avatar for VB 2012

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] ?

Member Avatar for VB 2012
0
155
Member Avatar for aaronoafc

I think that you need to change [CODE]Console.ReadLine()[/CODE] to [CODE]uservalue = Console.ReadLine()[/CODE],

Member Avatar for Begginnerdev
0
131
Member Avatar for VB 2012

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 …

Member Avatar for VB 2012
0
3K
Member Avatar for MassimilianoRiz

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, …

Member Avatar for thines01
0
136
Member Avatar for skp03

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 …

Member Avatar for M.Waqas Aslam
0
224
Member Avatar for trisha0906

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 …

Member Avatar for trisha0906
0
113
Member Avatar for skp03

@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, …

Member Avatar for Reverend Jim
0
434
Member Avatar for khizer03

I've commented just now on the same topic, so read here: [url]http://www.daniweb.com/software-development/vbnet/threads/400782[/url]

Member Avatar for adam_k
0
103
Member Avatar for solomon_13000

@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 …

Member Avatar for solomon_13000
0
248
Member Avatar for anc6802

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].

Member Avatar for anc6802
0
304
Member Avatar for Tobyjug2222

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] …

Member Avatar for berniefitz
0
1,000
Member Avatar for flywheeljack

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 …

Member Avatar for Netcode
0
164
Member Avatar for skp03

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: …

Member Avatar for adam_k
0
428
Member Avatar for Thermalnuke

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 …

Member Avatar for adam_k
0
94
Member Avatar for dre-logics

[CODE]Select articlenb , productcode, sum(amount) from article group by productcode order by productcode[/CODE]

Member Avatar for adam_k
0
192
Member Avatar for parag_dekate

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 …

Member Avatar for adam_k
0
113
Member Avatar for jaimin4829

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 …

Member Avatar for adam_k
0
143
Member Avatar for toldav

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 …

Member Avatar for Ezzaral
0
352
Member Avatar for Human2.0

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.

Member Avatar for Human2.0
0
613
Member Avatar for resell4

[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.

Member Avatar for Netcode
0
328

The End.