我正在研究SQLite数据库.我正在将数据插入到数据库中,这很好.但我想删除数据库中的数据不起作用,我想我做错了以下是我的代码,请任何人帮助我:
-(IBAction)deleteData {
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
NSString *databasePath=[documentsDir stringByAppendingPathComponent:@"paddleEight.sqlite"];
NSLog(@"The Database Path is---> %@", databasePath);
sqlite3_stmt *compiledStatement;
sqlite3 *db;
NSString *sqlStatement = @"DELETE from GalleryTabel;";
if (sqlite3_open([databasePath UTF8String], &db) == SQLITE_OK) {
if (sqlite3_prepare(db, [sqlStatement UTF8String], -1, &compiledStatement, NULL) == SQLITE_OK) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"record" message:@"record Deleted" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
alert=nil;
}
sqlite3_finalize(compiledStatement);
}
}
Run Code Online (Sandbox Code Playgroud) 我想通过前端查询检索数据库常量,以在DropDownList中填充此常量字符串.
我试过以下查询
select pr_Package.constant_String from dual;
Run Code Online (Sandbox Code Playgroud)
欢迎提出建议.
最近我一直在创造一个游戏,但我遇到了问题.为了计算你对敌人的击中,它使用变量剑.
此时玩家可能购买或未购买过剑,因此我收到一条错误消息:"未声明的变量".有没有办法解决尚未声明的变量?
我已下载Oracle Forms但我无法在Windows 7(32位)中安装它.我收到了一个错误
Using paramFile: ..\install\oraparam.ini
Checking installer requirements...
Checking operating system version: must be 5.0, 5.1 or 5.2. Actual 6.1
Failed <<<<
Exiting Oracle Universal Installer, log for this session can be found at C:\Program Files\Oracle\Inventory\logs\installActions2012-06-09_09-56-47PM.log
Please press Enter to exit...
Run Code Online (Sandbox Code Playgroud)
请帮我安装.
我正在自定义 HTML5 视频以适合我正在构建的 Web 应用程序。想知道我们是否有机会将我们自己的徽标添加/嵌入到视频控件中。
请建议或向我发送参考链接。
我试图将值从表 G0DM 插入到 G0RDM。我面临的问题是 GODM 表中 DOJS 列中的日期被指定为“01-01-00”格式。年份值输入为“00”,需要显示为 2000。我尝试更改数据库手动输入,但即使我尝试过,错误也会不断出现。其他与日期相关的列也有同样的问题。所以手动更改它是如此困难..
我的查询:
INSERT INTO g0rdm
(aud_number,
short_code,
entitlement_number,
abbrevi,
name,
designation,
person_charge,
office_name,
place,
dob,
dojs)
SELECT aud_number,
short_code,
entitlement_number,
abbrevi,
name,
designation,
person_charge,
office_name,
place,
To_date(dob, 'dd-mm-yyyy'),
To_date(dojs, 'dd-mm-yyyy')
FROM g0dm;
Run Code Online (Sandbox Code Playgroud)
错误信息是:
SQL Error: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
01841. 00000 - "(full) year must be between -4713 and +9999, and not be 0"
*Cause: Illegal year entered
*Action: Input year in the …Run Code Online (Sandbox Code Playgroud) 我一直在尝试运行这个脚本,但我得到的只是这个错误:
Error report:
ORA-06550: line 3, column 15:
PLS-00103: Encountered the symbol "IS" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
The symbol "IS" was ignored.
Run Code Online (Sandbox Code Playgroud)
这是我的脚本:
set serveroutput on
DECLARE
cursor depts_cur is select dname from dept;
depts_cur_rec is depts_cur%type;
BEGIN
loop
fetch depts_cur into depts_cur_rec;
exit when depts_cur_rec%notfound;
dbms_output.put_line('Department: ' || depts_cur_rec);
end loop;
close depts_cur;
END;
Run Code Online (Sandbox Code Playgroud)
非常感谢您的帮助.
我正在运行存储过程:
CREATE OR REPLACE MYSP (runDate Date)
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE MYTABLE AS (SELECT * FROM DATATABLE WHERE DATADATE = :1' USING runDate);
END MYSP;
Run Code Online (Sandbox Code Playgroud)
我收到错误 -
ORA-01027: bind variables not allowed for data definitions operations
ORA-06512: "Database.MYSP", line 4
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我在哪里出错.
这个作品
要创建docker卷而不指定磁盘大小:
docker volume create disk1
Run Code Online (Sandbox Code Playgroud)
将卷(disk1)安装到容器
docker run -itd -v disk1:/data ubuntu
Run Code Online (Sandbox Code Playgroud)
这不起作用
现在通过指定100mb的大小来创建docker卷
docker volume create --name disk2 --opt o=size=100m
Run Code Online (Sandbox Code Playgroud)
将卷(大小为100 MB的disk2)安装到容器上
docker run -itd -v disk2:/data ubuntu
Run Code Online (Sandbox Code Playgroud)
当我运行这些命令时,出现以下错误
docker:来自守护程序的错误响应:装载卷'/ var / lib / docker / volumes / disk2 / _data'时出错:卷选项中缺少设备。
我有一个触发器不工作的问题.这是我的触发器代码
create or replace trigger "ZIVOTINJE_T2"
BEFORE
insert or update on "ZIVOTINJE"
for each row
begin
IF new.cijena>10 THEN
:new.cijena:=9.9
ELSEIF new.cijena<0 THEN
:new.cijena:=0.1
END IF;
end;
Run Code Online (Sandbox Code Playgroud)
当我尝试在表ZIVOTINJE中插入实体时,我得到了这个
ORA-04098: trigger 'DENISS.ZIVOTINJE_T2' is invalid and failed re-validation
Run Code Online (Sandbox Code Playgroud)