713 Posted Topics
Re: I'm pretty sure you'll find some code in here to get you started. | |
Re: This is a cartesian product. It happens because you didn't use a criteria when joining your 2 queries, so every value from query1 gets "joined" to every value from query2. Either find a common field to use as key for your join or create one. Read here on how you … | |
Re: [QUOTE=Ichcha;1616384][CODE]select CONVERT(varchar(50), (DATEADD(dd, @@DATEFIRST - DATEPART(dw, datecol), datecoll)), 101) [/CODE] gives first date but how could i assign it as week1 in [CODE]sum(case when datepart(wk,datecol)=1 then count1 else 0 end) week1, [/CODE] am trying to put first date as column header.. ist possible?[/QUOTE] Depending on the way you use to … | |
Re: No matter how you validate a text, you can never be certain that you've got the full name. At best you can validate that you've got a space between 2 chunks of string. You can do the extra mile and check the length of strings separated by the space, but … | |
Re: I believe that you are not closing the file. Try this: [CODE] dim F1 as FileStream F1 = System.IO.File.Open(File1Loc & File1Name, IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.None) F1.Close() [/CODE] If you read in MSDN: [url]http://msdn.microsoft.com/en-us/library/w55562a3(VS.71).aspx[/url] you'll see that FileClose closes IO to files opened with FileOpen. | |
Re: Use DayOfWeek in your start date (has to be datetime). [CODE]dim start_date as new datetime(2011,07,30) msgbox( start_date.dayofweek) [/CODE] You'll get an integer back showing what day is your start date (1= Monday, 2= Tuesday, ... 7 = Sunday) Add to your start date the result of 7 - start_date.dayofweek and … | |
Re: 1st of all you are using the Form_Load event to perform the calculations. This means that your program runs when your form is loaded. At the time your form is loaded, textbox 1-3 don't contain any text, so the result should be 0. To do the calculation automatically after the … | |
Re: You are seeing this because you are not doing any error control. Use a Try - Catch to handle the error: [CODE]Try TextBox1.AppendText(dic(c)) catch e as exception if e.message = "" then 'Insert the exact message of exception inside the double quotes. Msgbox ("Invalid Input") else msgbox(e.message) end if end … | |
Re: [CODE]select emp.* from employee emp inner join (select did, min(sal) as 'min_sal' from employee group by did) emp2 on emp.did = emp2.did and emp.sal = emp2.min_sal [/CODE] @Mikav6: Of course MS SQL supports nested queries, you just have to assign an alias to the query, before using it, as in … | |
Re: If these are all your bindings, then you have no use for customers other than to cut down results. If you want to avoid setting aliases, then why don't you select only workorder.* ? | |
Re: Datetime format in SQL Server depends on your profile. If you want to be sure that the date passed will be read correctly then use the [CODE]SET DATEFORMAT dmy[/CODE] command. For details read here: [url]http://msdn.microsoft.com/en-us/library/ms189491.aspx[/url] Any other way will be user specific and probably will be a lot of trouble. | |
Re: The hard part is the fingerprint scanner. Find out if you can use it with VB and how first. I'm guessing your second problem would have to be the logout event, as users tend to forget this (Can you replace the fingerprint with an inactivity timer or a button for … | |
Re: Read here: [url]http://www.daniweb.com/software-development/vbnet/threads/374020[/url] | |
Re: @chibex64: How is the FTP going to help? Anyway, what is the exact error you get fransiskus? | |
Re: You might also want to change your query to [CODE]Dim sql5 As String = "insert into table_data(type,description) values('ERROR','" + str_exception + "')" [/CODE]\ (Added single quotes to str_exception) | |
Re: [QUOTE=Oxiegen;1614069]Why not just create a random integer between 1 and 9, throw it into a string and then add a "0." in front of it? That would give you the 0.1, 0.2 and so on, as a String. Once that is done, you can convert the string into a double. … | |
Re: [QUOTE=KnifeDarky;1613428]No, i just want it to execute my commands typed in textbox. Look at the picture. When i type to textbox msgbox.show, i want it to show, if i type me.text = "bla bla", i want it to change the form text, it's just the examples, i want it to … | |
Re: my guess is that you've got an error in your logic. Rethink this part: [CODE] If dtSortView Is Nothing Then Dim dvSortedView As New DataView(dtSortView)[/CODE] If dtSortView [B]IS[/B] Nothing [B]then [/B]create a dataview on [B]Nothing[/B]? | |
Re: What version of SQL are we talking about? If it's Express, then there are limitations (to concurent users, GUI and others). Other than that all SQL servers are available to the network. Have your program connect to the SQL via the appropriate connection string (Look here : [url]http://www.connectionstrings.com/[/url] ) | |
Re: It depends on what you have in mind as a database program. You can build a front-end program for a database. | |
Re: 1st of all, debasisdas is correct to not just hand you the answer. If you know who the user is (you've just logged the user in), then store the username to a variable and use it to query the db for all the information you need. Hint: Use Friend for … | |
Re: [QUOTE=biindhe;1602272]hi every body, I need to help me,i want search my database by entering Id number in the text box. My project is db_2008 and vb.net 2010. thank u for u'r helping. mohamed abdi[/QUOTE] Dear friend, please share your code so far. It will be easier for us to point … | |
Re: The insert statement should be like: [CODE]"INSERT INTO table (userID, mileage) values ('" &lblID.Text &"','"& txtEndMiles.Text &"')" [/CODE] You didn't provide the table name and I'm guessing you have to change the userID to whatever you've named it. | |
Re: Using the Try - Catch method. [CODE]Try Shell("\bin\game.exe", AppWinStyle.NormalNoFocus) catch ex as Exception if ex.message = "" 'Can't remember the exact text, type in the exact exception message then MessageBox.Show("File not found.Please place the program into the program folder") else msgbox (ex.message) end if end try [/CODE] | |
Re: Your problem is the query that you are using. [CODE]SELECT * FROM employees,username WHERE ID=IDE[/CODE] What you've done is select everything from both tables and not the info for the current user. Like I've replied in another thread you've started, store the username of the user logged in in a … | |
Re: I believe that the flags system isn't the best way to go with this. If you flag, then you force pre-defined time slots for a resource. This means that if I need the resource for 09:45 - 11:15 I have to book them from 09:00 until 12:00. Why not go … | |
Re: When you use the dropdown, do you get results in your GridView? | |
Re: For just 3 values, with no history or change log requirement, I'd go with application settings as Pgmer suggested. | |
Re: I don't see how environment vars are going to help you, unless the biometrics system sets one to something when the user logs in. I'd go with the date modified of the "log file". Use a timer to run every x mins and check if the file has been modified … | |
Re: You won't get read of pagefile that easy. Pagefile is a file that "extends" your pcs ram. When windows don't have enough memory to store data, they write the data that won't fit into memmory into the pagefile, thus "extending" your ram. I doubt that you can delete it, as … | |
Re: When you select using the WHERE in your query, do you get all the results or just the ones replaced? | |
Re: BitBit is right, if distinct doesn't work then the rows aren't duplicates. Do you have multiple records in some table or are these records coming from a cartesian join? | |
Re: It seems to me that you know the commands, but you've got the order messed up. Decide the flow of your program and then put your commands in the appropriate order. For example: Check if Text1.text is numeric, check if text2.text is numeric.... and then execute if isnumeric(text1.text) then .... … | |
Re: 2 ways to get this done: a) load form3, hide it and pass values directly to form 3 objects using a syntax: [CODE]Form3.textbox1.value = Me.textbox3.value[/CODE]. This might require some more changes on the modifier's property of your controls. b) create variables to hold the data and populate form3 when you … | |
Re: [QUOTE=BARATUM;1607755]Hi I have try implemet the code you suggested but i throw me run time error >< [ATTACH]21707[/ATTACH][/QUOTE] Is that a space after the dot and before the txt ? Are you sure that this is the way the file is named? ("MyData. txt") | |
Re: Is it just me or is the str empty? | |
Re: Read here for one way to get this done: [url]http://msdn.microsoft.com/en-us/library/46d41xk2(v=VS.90).aspx[/url] | |
Re: Can you explain what you are doing and what the question is a bit? I don't really understand the question. | |
Re: [QUOTE=HEEELPPP MEEEE;1608079]wait whaat ? :( ok i wrote a SUUUUPEEERRR loong essay! and copied it and pasted it tm my friends wall. and closed the internet down. then! i comback on and its not there! i get pissd! and now ive already copied n pasted somthing els! how do i … | |
Re: Wouldn't it be way easier to update your records directly in the db? What kind of db are you updating? | |
Re: Why would you do something like relationship? Why not insert based on the ID you already have? (And why is the U_ID not getting a value?) If I understand correctly, you want to store in the table search_result, the results for each users query. Questions: 1. Do you know the … | |
Re: [CODE] dim counter as int For Each row As DataGridViewRow In DataGridView1.Rows if row.cells("Column Name").value = "True" then counter += 1 End if Next if counter = 1 then btnEdit.Enabled = True Else btnEdit.Enabled = False End If [/CODE] | |
Re: Care to explain your question a bit further? Doesn't Oxiegen's post answer your question? | |
Re: Next time start with [CODE]lblOutput.Text = 0[/CODE] this will clear the result from the previous calculation. If the first time you've run your sub you got the result correct, then this should be your only problem. | |
Re: Do you want to share the code that you are working on? The short answer is by adding a where clause to your select statement. | |
Re: Do you want to count as part of the same select ? Your example result doesn't count. Anyway, you can count using an outer join. Since you already have the join written, I'm guessing that you want the results to be in 1 field (like your example result). Then do … | |
Re: To change the time, you can check the length and determine where to insert the : try this [CODE]select case when len(time_field) = 4 then convert(char(2),left(time_field,2)) + ':' + convert(char(2),right(time_field,2)) when len(time_field) = 3 then convert(1),left(time_field,1)) + ':' + convert(char(2),right(time_field,2)) from table[/CODE] | |
Re: You are declaring the Salestextbox, Bosttextbox as integers, while at the same time you are using these names for textboxes? Why not go ahead and use [CODE]Salestextbox.text= integer.parse(Salestextbox.text.tostring)[/CODE] (Notice that both times I'm using textbox.text and not the actual textbox, which is an object and not the object's text). |
The End.