我正在使用SQLite来处理我正在处理的数据输入Windows 8应用程序.我可以创建数据库,插入数据,检索列数和读取数据,但无法获取列名.
底层框架来自这篇文章.
我读到了关于PRAGMA table_info(table_name);命令但我似乎无法正确发送和回读此查询.我一直在谷歌搜索3天!
MainPage.xaml.cs中:
using SQLite;
using SqlLiteTest.Model;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Windows.Storage;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace SqlLiteTest
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
txtPath.Text = ApplicationData.Current.LocalFolder.Path;
}
private async void createDB(object sender, RoutedEventArgs e)
{
// access local folder
var qvLocalFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
try
{
//Create a blank carrier file
StorageFile qvLocalFileCarrier = await qvLocalFolder.CreateFileAsync("qvdbLocal.db", CreationCollisionOption.FailIfExists);
//Write the …Run Code Online (Sandbox Code Playgroud)