小编Gar*_*054的帖子

从sqlite表windows 8 app中读取列名

我正在使用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)

c# windows sqlite

0
推荐指数
1
解决办法
2615
查看次数

标签 统计

c# ×1

sqlite ×1

windows ×1