I have searched most of SO, and spent countless hours googling, so I'm going to post in the hopes that someone can help or just tell me it can't be done!
I am trying to make my vb.net uwp application be able to query a local sqlite database with a test query, but I am at a complete loss trying to find an example or any sort of documentation that isn't in c# without a clear parallel to how to translate to vb.net.
I have a base test class that can successfully connect with my database file, but I can't find anywhere how to do a query - all the resources online just link me to either vb.net without uwp or c# with uwp! I'll paste my code, but links to any resources or any advice would be so so helpful :)
Public Class dtbTest
Private conn As SQLiteConnection
Private sqcommand As SQLiteCommand
Private query As String = "SELECT * FROM userdetails"
Private cnn As SQLiteConnection
Private DBConnection As String = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "test.s3db")
Private tableInfo As List(Of SQLiteConnection.ColumnInfo)
Public Sub New()
Try
conn = New SQLiteConnection(DBConnection)
conn.BeginTransaction()
tableInfo = conn.GetTableInfo("userdetails")
sqcommand.CommandText = query
Catch
End Try
End Sub
End Class
如果人们感兴趣,我可以通过尝试新的Microsoft.Data.SQL程序包使其正常工作,因此建议您检查是否有人遇到类似的问题!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.