[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

query from a listview result, code used in vb6 not working in vb.net --- help ---

Hey guys i am trying to query based from the result from the listview box, i am using the code that works in vb6 but doesnt want to work in .net

some help would be great

        sql = "select * from [stock_card] where [stockid] =   " & ListView1.SelectedItems.Item(1)
1 Solution
sql = "select * from [stock_card] where [stockid] =   " & ListView1.SelectedItems.Item(1).Text

What error are you getting ? Is your sql correct ? Do you have a problem executing the statement and getting the values, ...
awolarczukAuthor Commented:
didnt have to .text that wasnt neededin the vb6 one thanks for that

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now