Santanu.Das 128

From my opinion:
before use If sqlRead.Read() Then at line No. 27 of your code, ensure that the Reader object has any row to read on matching parameters you supplied in your sql statement. If the reader does not hold any record it may raised an exception, because it has no records to read..

If sqlRead.HasRows() Then
    sqlRead.Read()
    <Codes of yours for matching records>
Else
    <codes for unmatching>
Endif

In line No. 28 the code should be

If (Decrypt(sqlRead("Password")).Equals(PasswordTextBox1.Text))

Hope it can solve your problem

Santanu.Das 128

Change ADP = New OleDbDataAdapter(query, cnnOLEDB) with cmdOLEDB = New OleDb.OleDbCommand(query, cnnOLEDB) at the line no 78. without initializing command object u canot use it.

Santanu.Das 128

from my opinion: when you have tried to add parameters with command object by using parameters.Add() method you must have to convert the type of the value which you want to save in respect of the parameter type you declared in your code. Exception could be raised from your code lines 18 & 29: Text Type never be stored in int type.

You can use the method Parameter.AddWithValue(), in this method you have no need to declare the parameter type but you must convert the value in respect of field type of your database .

Santanu.Das 128

' Check if any rows exist
            If rd.Read() Then
                If rd.GetString(3) = "small" Then
                    MessageBox.Show("small")
                ElseIf rd.GetString(3) = "Big" Then
                    MessageBox.Show("big")
                ElseIf rd.GetString(3) = "Midium" Then
                    MessageBox.Show("Mid")
                End If
            End If

This is not the proper way to check any record if it exists.
datareader.Read() always produce a single record of a data table. To read multiple record you must do a loop by using datareader.Reaad().

To check a conditional record exists in a table or a datareader you create by using a SQL query statement, you must first do the checking if the datareader holds any record or not by using datareader.HasRows() function, which supplies a boolean value if the datareader holds any record or not. without checking it datareader.Read() can give you an exception/error if it doesn't hold any record.

' Check if any rows exist
    if rd.HasRows() then
        rd.Read()
        If rd.GetString(3) = "small" Then
           MessageBox.Show("small")
        ElseIf rd.GetString(3) = "Big" Then
           MessageBox.Show("big")
        ElseIf rd.GetString(3) = "Midium" Then
           MessageBox.Show("Mid")
        End If
    End If

Hope it can help you to solv your problem

Santanu.Das 128

strSearchText = TextBox2.Text
Dim sqlquery As String = "Select * from Housedat where (PROPID LIKE '%" & TextBox2.Text & "%')"
Why do you not using the 'strSearchText' ? In Sql Query any string type condition must be within a single quation.

  strSearchText = TextBox2.Text
    Dim sqlquery As String = "Select * from Housedat where (PROPID LIKE '%'" & strSearchText & "'%')"

But it was better if you use a parameterised query.

Santanu.Das 128

Fiestly please show the code what you did.

Secondly, for every catagory at the end the subtotals should be added as a listitem for that catagory. Or you have to create an User Control for your use.

Santanu.Das 128

Post your codes and problems where from we can help you to solve your problem.

Santanu.Das 128

You can do it by using a STRUCTUREwhich can give you full functionality to solve your problem.

Read this post you can get your way to solve the problem by yourself.

ddanbe commented: Nice +15

Santanu.Das 128

How could you use a string value to a date type field i.e.
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
Command.Parameters.Add("@d1", OleDbType.Date).Value = xFrom Command.Parameters.Add("@d2", OleDbType.Date).Value = xTo

Santanu.Das 128

FROM WHICH TABLE YOU ARE GETTING THESE [AMOUNT],[INTEREST],[TERMS], [TotalInterest]. YOU MUST SPECIFY THEM IN FROM CLAUSE.

YOU CAN USE BETWEEN CLAUSE FOR A RANGE OF DATES IN WHERE CLAUSE.
`WHERE (LOANS.RELEASED BETWEEN @d1 and @d2)

Reverend Jim commented: Please stop shouting -3

Santanu.Das 128

Thanks rproffitt.

The solution for oct'17 there was the same. I already reinstalled the os from recovery drive.

Santanu.Das 128

didn't update by Windows 10’s April 2018 Update (version 1803).

Santanu.Das 128 Santanu Das

A cumulative update May-18 released by Microsoft, there are some new features added and I update my W10 in my lap but after updating VS-15 Pro does not load its full features, when I try to run it and for that reason I do not open any solution or create any new solution. Every time when I try to open a solution it always redirect me to read applog file. But in blend the solution opens correctly and runs as my desire.

I tried to repair the VS but nothing is happened. After that reinstalling VS it also shows me same.

What I can do to run my VS in this W10 version?

Santanu.Das 128

It should be a DataAdapter object. It has various type of property to maintain a database by using a command object.

Santanu.Das 128

@Jim: You are correct.
But adapterDelete has no use in the procedure and all objects like connectionstring, mysqlcommand are declared before use them except that one. IDE can poit out the fault in codes by the exception object reference not set to an instance of an objectat the time of debugging and bulding the solution if you do not declare the object in your project publicly/privately before use it.

This codes is copied by the OP from YouTube which he/she already declared and may be made some changes however he knows but has no conception how much he can copy it and which portion he has to delete/use.

Santanu.Das 128

adapterDelete.DeleteCommand = MysqlConnection.CreateCommand()
adapterDelete.DeleteCommand.CommandText = sql

These two lines are caused for your error. adapterDelete does not declare in your code. except that every thing are ok.

Santanu.Das 128

You can get an idea from this post in daniweb

Santanu.Das 128

Please post, what you tried in your sql statement.

Clue: just Join and select the max value.

Santanu.Das 128

Why gg.Dispose() ??

fro my opinion from there your problem has been arised.

Santanu.Das 128

You can read this overview, which can help you.

Santanu.Das 128

Post your codes which you tried to store data to database from datagridview by which we can help you to solve your problem.

Well! pick up the current row (i.e. the row in which you are writting the values) of the datagridview and creating an sql command you can store it in your access database.

Santanu.Das 128

From my opinion your problem should be in construction of sql statement i.e."SELECT '#' FROM tblBasicInfo, tblAccData WHERE ID =" + Convert.ToInt32(AcNotextBox.Text)

Use Inner join clause to join two tables.
You can try it

"SELECT A.ID,A.Name,.....,B.Pro FROM tblBasicInfo A Inner Join tblAccData B On B.ID=A.ID WHERE A.ID =" + Convert.ToInt32(AcNotextBox.Text)

***Use Parameterised queries to prevent sql injection to your database.

Santanu.Das 128

From my opinion your error should be occurred in between these following lines.
cmd1.ExecuteNonQuery()
cmd1.CommandText = InsertOrderTBSelect

First dispose/close the sqlcommand object then use it for another sql statement.

Santanu.Das 128

First post your codes you already tried.

Santanu.Das 128

Split the sentence with space and store it in an array then convert to proper case of the first and last element of that array. After that join the array elements with space.

Santanu.Das 128

Group By clasue always produce a count or summation of another field. It never shows other feilds, if you tried to so the values of other fields without aggregating them it shows an error message.

If you want to group by with a single field you only can get the aggregated fields. The syntax should be

select p.prtgst,sum(prd.totaltaxamt)As Rate,sum(prd.TaxableAmt)As Taxable_Amount
        from TBL_pur_inv as pr
        INNER JOIN tbl_party_ldg  AS p   ON pr.partyIDpur = p.partyID
        INNER JOIN TBL_pur_invdet  AS prd   ON pr.purinvid = prd.purinvid
        where prd.purinvdt ='2018-01-04' GROUP BY  prd.pdcgst

But to get every feild values the systax should be

select p.prtgst,p.prtynm,pr.invno,pr.invamt,PR.purinvdt,prd.pdcgst,sum(prd.totaltaxamt)As Rate,sum(prd.TaxableAmt)As Taxable_Amount
        from TBL_pur_inv as pr
        INNER JOIN tbl_party_ldg  AS p   ON pr.partyIDpur = p.partyID
        INNER JOIN TBL_pur_invdet  AS prd   ON pr.purinvid = prd.purinvid
        where purinvdt ='2018-01-04' GROUP BY  prd.pdcgst,p.prtynm,pr.invno,pr.invamt,PR.purinvdt,prd.pdcgst

Santanu.Das 128

?? WHERE [Item_Number]='"+ textBox1.Text +"'"
Do it with parameter as you did about 'qun'.

Santanu.Das 128

You can read this link to read a text file to get the lines.

Santanu.Das 128

INSERT INTO <DESTINATION TABLE NAME> SELECT * FROM <SOURCE TABLE NAME>

BUT FIELDS NAME AND TYPE OF DESTINATION SHOULD BE SAME AS SOURCE.

Santanu.Das 128

No need to use canvas, h.alingment of ellipse should be left.

ddanbe commented: Thank you for this info! +15