[不是问题]我在编写此代码时遇到错误 [英] [Not a question] I m getting error aftrwriting this code

查看:95
本文介绍了[不是问题]我在编写此代码时遇到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

string dbpath = @"D:\Demo.db";

    SQLiteConnection connection = new SQLiteConnection("Data Source =" + dbpath);
    connection.Open();
    String query = "Insert into Customer(Job No,Customer Name,Address,Mobile No 1,Mobile No 2,Mobile No 3,Email_ID) values (" +txtsr.Text+","+txtname.Text+","+txtadd.Text+","+txtmb1.Text+","+txtmb2.Text+","+txtmb3.Text+","+txtemail.Text+")";
    SQLiteCommand command = new SQLiteCommand(query,connection);
    command.ExecuteNonQuery();
    connection.Close();

推荐答案

您还没有提供足够的信息。

我假设连接字符串可能存在问题,所以我建议你看一下此处 [ ^ ]。



-KR
You have not given plenty of info.
I'm assuming that there might be an issue with the connection string, So I'd suggest you to take a look at some example of Sqlite connection string at here[^].

-KR


这篇关于[不是问题]我在编写此代码时遇到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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