如何在VB.NET中的listview中显示sqlite表 [英] How to I display sqlite table in listview in VB.NET

查看:185
本文介绍了如何在VB.NET中的listview中显示sqlite表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我正在第一次使用SQlite开展项目。我已经能够加载所有表格以在组合框中显示。现在,我需要能够显示从组合框中选择的任何表的详细信息,以便在Listview中显示。

我真的非常感谢你。



我尝试了什么:



Dim conn As New SQLite.SQLiteConnection

Dim cmd as SQLiteCommand

Dim da As SQLite.SQLiteDataAdapter

Dim ds As SQLiteDataReader

Dim itemcoll(100)As String



Me.ListView1.View = View.Details

Me.ListView1.GridLines = True

conn =新SQLiteConnection(db)

Dim strQ As String = String.Empty

strQ =SELECT * FROM& ComboBox1.Text&

cmd =新的SQLiteCommand(strQ,conn)

da =新的SQLite.SQLiteDataAdapter(cmd)

解决方案

请参阅 SQLiteDataAdapter类 [ ^ ]。

hello. I am working on a project using SQlite for the first time. I have been able to load all tables to display in a combobox. Now i need to be able to display the details of any table you selected from the combobox to be displayed in a Listview.
I'll indeed be very grateful thank u.

What I have tried:

Dim conn As New SQLite.SQLiteConnection
Dim cmd As SQLiteCommand
Dim da As SQLite.SQLiteDataAdapter
Dim ds As SQLiteDataReader
Dim itemcoll(100) As String

Me.ListView1.View = View.Details
Me.ListView1.GridLines = True
conn = New SQLiteConnection(db)
Dim strQ As String = String.Empty
strQ = "SELECT * FROM " & ComboBox1.Text & """"
cmd = New SQLiteCommand(strQ, conn)
da = New SQLite.SQLiteDataAdapter(cmd)

解决方案

See SQLiteDataAdapter Class[^].


这篇关于如何在VB.NET中的listview中显示sqlite表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆