713 Posted Topics

Member Avatar for monaiz
Member Avatar for Netcode
0
158
Member Avatar for Ichcha

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 …

Member Avatar for adam_k
0
153
Member Avatar for Ichcha

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

Member Avatar for Ichcha
0
115
Member Avatar for Tammm

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 …

Member Avatar for adam_k
0
155
Member Avatar for limskii
Member Avatar for get connected

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.

Member Avatar for Reverend Jim
0
2K
Member Avatar for ahmed zidane

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 …

Member Avatar for adam_k
0
528
Member Avatar for Hayssam

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 …

Member Avatar for adam_k
0
190
Member Avatar for Man1919

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 …

Member Avatar for Man1919
0
438
Member Avatar for nohal.surya

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

Member Avatar for adam_k
0
154
Member Avatar for tombihn

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.* ?

Member Avatar for tombihn
0
784
Member Avatar for PS189

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.

Member Avatar for BitBlt
0
122
Member Avatar for zoraster01

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 …

Member Avatar for synatx error
0
781
Member Avatar for n1_razz11
Re: help

Read here: [url]http://www.daniweb.com/software-development/vbnet/threads/374020[/url]

Member Avatar for n1_razz11
0
141
Member Avatar for fransiskus

@chibex64: How is the FTP going to help? Anyway, what is the exact error you get fransiskus?

Member Avatar for Netcode
0
477
Member Avatar for abc88

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)

Member Avatar for Netcode
0
210
Member Avatar for nji2rhyme

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

Member Avatar for nji2rhyme
0
338
Member Avatar for KnifeDarky

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

Member Avatar for KnifeDarky
0
1K
Member Avatar for dwinn

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

Member Avatar for adam_k
0
146
Member Avatar for jgat2011

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

Member Avatar for Netcode
0
140
Member Avatar for zebnoon
Member Avatar for ubayedullah

It depends on what you have in mind as a database program. You can build a front-end program for a database.

Member Avatar for debasisdas
0
59
Member Avatar for bradploz

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 …

Member Avatar for Netcode
0
109
Member Avatar for biindhe

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

Member Avatar for Netcode
0
224
Member Avatar for mrbungle

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.

Member Avatar for mrbungle
0
146
Member Avatar for MarkGia

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]

Member Avatar for MarkGia
0
454
Member Avatar for bradploz

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 …

Member Avatar for adam_k
0
173
Member Avatar for imolorhe

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 …

Member Avatar for imolorhe
0
328
Member Avatar for ShaggyDogg
Member Avatar for ShaggyDogg
0
216
Member Avatar for ijsrog

For just 3 values, with no history or change log requirement, I'd go with application settings as Pgmer suggested.

Member Avatar for adam_k
0
133
Member Avatar for aldeene

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 …

Member Avatar for adam_k
0
121
Member Avatar for wmc1956

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 …

Member Avatar for tigerbright
0
574
Member Avatar for arsheena.alam

When you select using the WHERE in your query, do you get all the results or just the ones replaced?

Member Avatar for arsheena.alam
0
200
Member Avatar for prit005

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?

Member Avatar for Netcode
0
233
Member Avatar for VBNewUSer

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

Member Avatar for VBNewUSer
0
1K
Member Avatar for espinaian

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 …

Member Avatar for san-biegwenja
0
170
Member Avatar for BARATUM

[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")

Member Avatar for adam_k
0
173
Member Avatar for ClimaxBeetle
Member Avatar for mike2098

Read here for one way to get this done: [url]http://msdn.microsoft.com/en-us/library/46d41xk2(v=VS.90).aspx[/url]

Member Avatar for Mitja Bonca
0
394
Member Avatar for SG01

Can you explain what you are doing and what the question is a bit? I don't really understand the question.

Member Avatar for adam_k
0
172
Member Avatar for vb2learn

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

Member Avatar for adam_k
0
2K
Member Avatar for rscoville

Wouldn't it be way easier to update your records directly in the db? What kind of db are you updating?

Member Avatar for rscoville
0
151
Member Avatar for rEhSi_123

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 …

Member Avatar for adam_k
0
2K
Member Avatar for dibakarmishra

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

Member Avatar for adam_k
0
1K
Member Avatar for meetarun007

Care to explain your question a bit further? Doesn't Oxiegen's post answer your question?

Member Avatar for adam_k
0
2K
Member Avatar for vijaybrar

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.

Member Avatar for adam_k
0
236
Member Avatar for Leodumbi

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.

Member Avatar for jgat2011
0
138
Member Avatar for jovillanuev

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 …

Member Avatar for adam_k
0
81
Member Avatar for dwinn

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]

Member Avatar for adam_k
0
211
Member Avatar for Purrenhage

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

Member Avatar for adam_k
0
150

The End.