小编Gk_*_*999的帖子

将元数据库连接到 Sql Server

我在 Windows 10 机器上安装了 Java 并下载了 Metabase.jar并运行它。

现在我可以在localhost:3000访问元数据库

但我无法将我的 SQL Server 数据库设置为数据参考。

我要么得到:

无法连接到数据库。请检查连接详细信息。

或者

5000 毫秒后超时。

任何成功完成Metabase - SQL Server连接的人?

java sql-server metabase

6
推荐指数
1
解决办法
5255
查看次数

使用 PDFSharp 将文本转换为 PDF

我想使用 PDFsharp 将文本文件转换为 PDF。应该采取什么方法?甚至有可能吗?我正在使用 C#.net 开发 Web 应用程序

converter pdfsharp

4
推荐指数
2
解决办法
6018
查看次数

声明List <IEntity <T >>其中T:class

我做了一个界面

public interface IEntity<T> where T:class
{
   public Save(T entity);
   public Update(T entity);
   IEnumerable<T> GetAll();
   T GetById(int id);
}
Run Code Online (Sandbox Code Playgroud)

现在,我有另一个类,其中我想创建此IEntity类型的列表.

public class myClass
{
   public List<IEntity<T>> NewList = new List<IEntity<T>>();  // how to tell the compiler where T is class
}
Run Code Online (Sandbox Code Playgroud)

但是这给了我错误的说法

The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)

这甚至可能吗?

c# list generic-list

2
推荐指数
1
解决办法
677
查看次数

SQLite.NET检查表中是否存在列

我创建了以下方法,可在已存在的SQLite表中添加一列

public async void AddColumnMyNewColumn()
{
    SQLiteAsyncConnection conn = new SQLiteAsyncConnection(path);
    await conn.ExecuteAsync("ALTER TABLE MyTable ADD COLUMN MyNewColumn bit DEFAULT 'False';");
}
Run Code Online (Sandbox Code Playgroud)

它在MyTable中创建一个新列MyNewColumn。

下次调用AddColumnMyNewColumn方法时,它将引发错误。

如何检查此列是否已创建?

我已经检查过这个这个了,但是我不能将这些东西放在一起得到这样的东西。

public async void AddColumnMyNewColumn()
{
    SQLiteAsyncConnection conn = new SQLiteAsyncConnection(path);
    bool columnExists;

    //Check if column exists & set columnExists accordingly

    if(!columnExists)
        await conn.ExecuteAsync("ALTER TABLE MyTable ADD COLUMN MyNewColumn bit DEFAULT 'False';");
}
Run Code Online (Sandbox Code Playgroud)

c# sqlite windows-runtime sqlite.net

0
推荐指数
2
解决办法
2848
查看次数