467 Posted Topics

Member Avatar for jez9

Referrencing from [your post](https://www.daniweb.com/software-development/vbnet/threads/490835/calculation-in-listview) Do the same as you did in that post. Private Sub clickMe(sendr As Object, ByVal e As EventArgs) Dim btn As Button = CType(sendr, Button) Dim ProdMatch As Boolean = False For i As Integer = 0 To lvorder.Items.Count() - 1 If lvorder.Items(i).SubItems(1).Text = btn.Text Then …

Member Avatar for jez9
0
109
Member Avatar for jez9

At Line No. 7 the declaration of command object would be Dim cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand(sql, con) And your SQL Statement would be sql = "insert into tblorder (code,items,total) values ('" _ & lblcode.Text & "','" _ & x.subitems(1).Text & "','" _ & lbltotal.Text & "')" Use parameterised …

Member Avatar for jez9
0
284
Member Avatar for littlerockit

Please, post the codes you wrote first and then describe your problem. Forum members are here to help you.

Member Avatar for littlerockit
0
507
Member Avatar for altjen

Agreed with hericles, Use parameterised query to prevent mallicious attack to your database. Your codification if to some correct, only needed simple modification. Exchange the place between Line No. 1 & 2. Mysqlconn = New MySqlConnection Mysqlconn.ConnectionString = "server=db4free.net;Port=3306; user id=****; password=d****; database=****g" If do I correct, **UserName** and **Password** …

Member Avatar for altjen
0
243
Member Avatar for jez9

What I think that you need an another column for rate. In your memo, you must inclde a column for rate of a single unit. The columns should be **Qty-------Name of Dish-----------Rate------------Price** So everytime, when you have tried to insert/increase a Qty of a product multiply QTY with rate to …

Member Avatar for jez9
0
593
Member Avatar for jez9

To get month name you can use **MonthName(Date.Now.Month)** function, which can convert integer values 1 to 12 to their corresponding month name.

Member Avatar for jez9
0
282
Member Avatar for jez9

Agreed with Reverend Jim. Use Question Mark i.e. **?** as a placeholder of a Parameter. Your SQL Statement shoud be Dim sql As String = "INSERT INTO tbldailysales(date, totalprice) VALUES(?, ?)" But, what was the error report. Is your connection Object Opened. I did not find it in your code.

Member Avatar for jez9
0
319
Member Avatar for Xiao_1

To move items from one to another is simple. After moving the item you can remove from the listbox items list by its selectedIndex value. If Not ListBox1.SelectedItem = Nothing Then ListBox2.Items.Add(ListBox1.SelectedItem) ListBox1.Items.RemoveAt(ListBox1.SelectedIndex) End If Hope it can help you

Member Avatar for Mr.M
0
176
Member Avatar for fugio

Agreed with @ddanbe, Everything could be done in a for loop at Form Load() event. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 6 DataGridView1.Rows.Add() If i > 0 Then DataGridView1.Rows(i).Cells(0).Value = (i + 1) + Val(DataGridView1.Rows(i - 1).Cells(0).Value) Else DataGridView1.Rows(i).Cells(0).Value …

Member Avatar for fugio
0
210
Member Avatar for krishom.ray

Yes, Mr. Ray, Please post how far you did and what problems you are facing to run your application. Everytime we are with you to help to overcome your problems. > i can use VB through VS2013 for front end and for Backgroung MS Access Database. No hasitation, 1) Design …

Member Avatar for Santanu.Das
0
116
Member Avatar for ZFPuhi

As per your codification **textbox2** is not for numbers. It would be **TextBox1**. > i need that to happen not every time i enter, but when it has only 9 and the person is trying to enter only 9. Is it for the text length? If it, the codes should …

Member Avatar for Reverend Jim
0
219
Member Avatar for jez9
Member Avatar for Pradnya_1
Re: vb6

To get proper help post your codes, how far have you done and also the error you have faced at run time. And also make a distinct question on that matter. Ok! **1st Option :** Take a TextBox, set Visible = False. Top & Left are same as the Label …

Member Avatar for clairestreb
0
82
Member Avatar for jez9

Your codification is quite right, except SQL Statement. It should be Dim sql As String = "UPDATE tbluser SET " & _ "name =?" & _ "pos =?" & _ "address =?" & _ "contact =?" & _ "username =?" & _ "WHERE ID =?" Here is a [tutorial](https://www.daniweb.com/software-development/vbnet/code/445801/use-parameterized-queries-to-avoid-sql-injection-attacks), please …

Member Avatar for jez9
0
135
Member Avatar for jez9

Reverend Jim is correct. Use Panel Control to Hold the Buttons instead of ListBox and set AutoScroll Property to True of the Panel Control. Make sure in which direction you want to arrange them, Horizontaly/Verticaly and calculate the control's position.

Member Avatar for jez9
0
95
Member Avatar for Xiao_1

Inspite of **MonthCalendar1_DateSelected()** event handler use ** MonthCalendar1_DateChanged()** event handler.

Member Avatar for Santanu.Das
-1
148
Member Avatar for Xiao_1

@Xiao_1: Don't make duplicate post or same post several times. You already create [another post on same topics](https://www.daniweb.com/software-development/vbnet/threads/490742/why-could-not-move-to-other-listbox).

Member Avatar for Santanu.Das
0
112
Member Avatar for BegginerLance

Bad choice! This is not the appropriate forum for your homework. Here is many to help you, but no one to do your homework.

Member Avatar for BegginerLance
0
154
Member Avatar for Nova6112

Search in net. There are too many Decompiler Software. You can retrive your source codes from your applications .exe file using any of them. But, I am not sure how much fruitful it might be. I never tried it.

Member Avatar for ddanbe
0
98
Member Avatar for jez9

ListBox is not the appropriate for this purpose. Anyone of Listview or DataGridView is best to show the receipt items.

Member Avatar for jez9
0
188
Member Avatar for jez9

If you try to hold the number, how many times you clicked a button, then Reverend Jim's technic is the perfect one. But, if you want to show the numbers as an item in a listview like a serial no, simply add the **ListView.Items.Count() + 1** as a item of …

Member Avatar for jez9
0
11K
Member Avatar for batoolhussain

Make two nested loops, 1st loop to go through Array1 and 2nd loop to go through Array2 for comparing. For i as Integer = 0 to Array1.GetUpperBound(0) Dim comp As Boolean = False For j as integer = 0 to Array2.GetUpperBound(0) If Array2(j)=Array1(i) Then comp = True Exit For End …

Member Avatar for batoolhussain
0
112
Member Avatar for vgxp

Agreed with @pritaeas, *Dim ImageData As Byte() = DirectCast(cmd.ExecuteScalar(), Byte())* never returns any data from database. You must have to read the field value of the database through MySqlDataReader() Class and then it can show the image from MemoryStream. Hope it can give a way to do your job.

Member Avatar for Mr.M
0
2K
Member Avatar for jez9

> Unable to cast object of type 'ListViewSubItem' to type 'System.IConvertible] An object never convert to Decimal type. The codes should be Dim qty = Convert.ToDecimal(lvorders.FocusedItem.SubItems(0).Text) Dim price = Convert.ToDecimal(lvorders.FocusedItem.SubItems(2).Text) Dim name = lvorders.FocusedItem.SubItems(1).Text.ToString() Then do the same as Reverend Jim describes.

Member Avatar for jez9
0
385
Member Avatar for Santanu.Das

It doesn't display my latest Avatar. I uploded it aproximately 8:00 pm, but now nearly 10::00 pm. Not Updated in two hours.

Member Avatar for Santanu.Das
0
156
Member Avatar for jez9

The codes are quite right. Why do you write the codelines 10 & 11 after complition of the loop. It could save the last row of your listview control. To save every rows from listview control write them into the loop. The codes should be For Each x As ListViewItem …

Member Avatar for jez9
0
220
Member Avatar for jessica_10

No one has an "Aladin's Light". Post your code, how far you go and the exceptions you are facing. Describe your problems, everyone hear to help you to solve your problems.

Member Avatar for Santanu.Das
0
207
Member Avatar for leyla

> 'Syntax error (missing operator) in query expression '[StudentID]='. From my assumption after seeing the exception **StudentID** is a Text Type field. So from my opinion write the SQL Statement as you did previously. i.e. "SELECT * FROM Subjects WHERE [StudentID]= '" & StudentID.Text & "'" Get sure that the …

Member Avatar for leyla
0
162
Member Avatar for Xiao_1

Codes are quite right. But, you didn't mention the **AdminNo** in select Statement to get as output result, so how could you get it from **sqlReader**. Already you have the AdminNo incbbproject combobox. Take it from there. If sqlReader.HasRows Then sqlReader.Read() txtpn.Text = (sqlReader.Item("ProNm").ToString) ListBoxassign.Items.Add(cbbproject.Items(cbbproject.SelectedIndex)) End If Hope it can …

Member Avatar for Santanu.Das
0
173
Member Avatar for jez9

You can do it easily if you create the corresponding Table Buttons Dynamically and show on the form. The codes should be Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim CMD As OleDB.OleDbCommand = New OleDb.OleDbCommand("Select * from tbltable1",con) con.Open() Dim rd As OldDbDataReader = CMD.ExecuteReader() If …

Member Avatar for jez9
0
161
Member Avatar for leyla

The codeblocks never returns any value. After `Closing` a form how could you think that the next codelins would be executed. You have already closed the LogIn form by calling `Me.Close()`. After execution of this line nothing could be executed. Your codes are quite right but some modification are needed. …

Member Avatar for leyla
0
1K
Member Avatar for WIN_2

Remember, to get ans. you will have to describe your probs. and the exception what are you facing. No one here to do the ans. finding qus./excp. from your post. Please make your post more distinct. From my opinion, 1) an exception can occur from the contruction of your [connection …

Member Avatar for Santanu.Das
0
182
Member Avatar for jonadi
Member Avatar for Santanu.Das

I have a curiosity about the “Title” of a member. Though, I do not worry about it, but I have a question on this matter. Why “Title” is assigned/updated by a member, not by forum as per their performance?

Member Avatar for <M/>
0
126
Member Avatar for Nova6112

No need to use **Format()** function because SQl doesn't understand it and also the single quatation marks. Only for String Type value you can use the Single Quatation Marks . The SQL Statement statement would be sql = "select * from ministmnt where (dat between " & DTPicker2.Value & " …

Member Avatar for Nova6112
0
130
Member Avatar for hacgor

In vb it is the syntax to write the DateTime value you must be prefixed and sufixed the value by Hash Character i.e. #. **Dim CurDateTime As Date CurDateTime = #1/16/2015 9:15:30 AM#**

Member Avatar for Santanu.Das
0
1K
Member Avatar for Nova6112

Post your codes first, then describe your problem and what do you desire. Too many exparts are here, obviously they help you to ovecome your problem.

Member Avatar for Nova6112
0
178
Member Avatar for CodingSource

The statement was quite right. Only between clause may be coverded by parenthesis. The statement would be Dim da As New OleDbDataAdapter("SELECT * from EncodingComplete where (Date_Bill BETWEEN @startDate AND @endDate) AND Client like @client Order by Date_Bill desc" , con) From my opinion, the exception arises form prarmeter declaration …

Member Avatar for Reverend Jim
0
1K
Member Avatar for batoolhussain

You can redimention the last element to change the size of the dynamic array. For one-dimention array ReDim Preserve DynamicArray(DynArray.GetUpperBound(0) + 1) For Two-dimention array ReDim Preserve DynamicArray(4, DynArray.GetUpperBound(1) + 1) For Three-dimention array ReDim Preserve DynamicArray(2, 4, DynArray.GetUpperBound(2) + 1) **GetUpperBound(2)** rerurns the upperbound of the array element. **GetLowerBound(0)** …

Member Avatar for Santanu.Das
0
124
Member Avatar for Nova6112

In VB6 Package And Deplyment Wizard, there is no option to assign the product key value. I think you should have to make your own set up wizard. It is possible. Try it.

Member Avatar for Nova6112
0
132
Member Avatar for Nova6112

In Package and Deployment Wizard you can attach every type of files you need and you can set their installation location. [Distributing Your Application](http://msdn.microsoft.com/en-us/library/aa716256(v=vs.60).aspx)

Member Avatar for Santanu.Das
0
140
Member Avatar for CodingSource

Do not understand which codeblocks you used to show your result in datagridview Block1 or Block2 Or both simultaneously. If you use both codeblocks simultaneously in a Button_Click event, **Blank** is the currect result. To get result use any one of the codeblocks with proper Sql Statement. CodeBlocks1 : Firstly, …

Member Avatar for Santanu.Das
0
2K
Member Avatar for Dani

Till now cursor jumps between "Home" and "End" position of a line, When I am tring to set the cursor position by clicking mouse in a line.

Member Avatar for Dani
3
702
Member Avatar for CodingSource

Store your date data in an encrypted file. At the time when application starts decrypt the file and pick up the date value and check it.

Member Avatar for Santanu.Das
-1
128
Member Avatar for Papa_Don

> I want to continue and begin at line 8 and do the following: To throw the blank lines you can use the condition If (textRowNo >= 8) And (Trim(LineFromFile) <> "") Then arrival = Mid(LineFromFile, 1, 9) status = Trim(Mid(LineFromFile, 11, 3)) '... End If

Member Avatar for Reverend Jim
0
9K
Member Avatar for Mohamed59

**SqlDatabaseClient(int Id, MySqlConnection Connection)** this is not a process to assign a open Connection object to a newly declared Connection Object. And the exception arises from here. Only pass the ConnectionString . The codes should be public SqlDatabaseClient(int Id, ConnStr as String) { mId = Id; mConnection.ConnectionString = ConnStr; mConnection.Open() …

Member Avatar for Mohamed59
0
1K
Member Avatar for Santanu.Das

Today's afternoon, I made an answare to the post **phone number** in vb.net forum. Now this is 8:18PM it is vanished.

Member Avatar for Santanu.Das
0
167
Member Avatar for Santanu.Das

Today, I get an mail from DW, though I get some mails everyday normally. But it attaracts me and raises my curiosity, for it's title "**You've Earned Rewards Points** and I can cashout it as per a line in my mail > Rewards points can be cashed out for real …

Member Avatar for imti321
0
359
Member Avatar for Taufique111

My point of view, your problem is in your connection string. A semicolon ";" should be needed after **.....\h.mdb"** that is like **.....\h.mdb;"**. Andalso remove the lines > cmd = new OleDbCommand(); > cmd.CommandType = CommandType.Text;

Member Avatar for mark261511
0
167
Member Avatar for CodingSource

@CodingSource: **DataBindings** is a Readonly property of DataGridView object, used to get the databindings of the object. So, remove the line 8. And also there is a need to modify your SQl Statement. It should be "SELECT * From EncodingComplete where Date_Bill Between " & DateTimePicker1.Value & " And " …

Member Avatar for Santanu.Das
0
807

The End.