SQLite“没有这样的表"错误 [英] SQLite 'no such table' error

查看:98
本文介绍了SQLite“没有这样的表"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里是菜鸟,但是为什么我会收到此错误?

I'm noob here but, why is it i'm getting this error?

我确实在一个名为Team.sqlite的SQLite中有一个名为Team的表!我还有什么需要提供的吗?

I DO have a table named Team in an SQLite called Team.sqlite! Is there anything else I need to provide?


ERROR
---------------
2009-12-23 23:17:05.277 PitScout[6690:207] *** Assertion failure in -[Team addTeam], /Users/******/Desktop/PitScout/Classes/Team.m:90
2009-12-23 23:17:05.280 PitScout[6690:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error while creating add statement. 'no such table: Team''
2009-12-23 23:17:05.280 PitScout[6690:207] Stack: (
    30131291,
    2502464777,
    30215227,
    810772,
    16329,
    12146,
    20588,
    2753625,
    4667381,
    2753625,
    3160994,
    3169731,
    3164943,
    2858547,
    2766876,
    2793653,
    37420753,
    29916032,
    29912136,
    37414797,
    37414994,
    2797571,
    10780,
    10634
)

推荐答案

  1. 使用CoreData.除非您有非常特殊的需求,否则直接使用SQLite会更困难,需要更多代码并且浪费时间.

  1. Use CoreData. Using SQLite directly is harder, requires more code, and is a waste of time unless you have very specific needs.

您说:

我确实有一个名为Team的表 SQLite称为Team.sqlite!在那儿 我还需要提供其他东西吗?

I DO have a table named Team in an SQLite called Team.sqlite! Is there anything else I need to provide?

这没有道理.您是说您有一个名为"Team.sqlite"的数据库吗?还是您有一个名为"Team.sqlite"的表?名为"Team.sqlite"的表与名为"Team"的表不同.

This doesn't make sense. Are you saying you have a database named "Team.sqlite"? Or do you have a table named "Team.sqlite"? A table named "Team.sqlite" is not the same as a table named "Team".

如何创建表格? IE.您使用的CREATE TABLE语句是什么?

How do you create the table? I.e. what is the CREATE TABLE statement you are using?

这篇关于SQLite“没有这样的表"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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