如何使用autohotkey将值插入sqlite3 [英] How to insert values into sqlite3 using autohotkey

查看:98
本文介绍了如何使用autohotkey将值插入sqlite3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是我无法使用自动热键将值插入sqlite3.

My problem is I am unable to insert values into sqlite3 using autohot key.

我的代码是:

MyName := name
myTel := telphonenumber


$sSQL := "insert into myTable Values ('" %MyName% "', " %myTel% ");"

我也尝试过,

$sSQL := "insert into myTable Values ( ' " . MyName . " ', " . myTel . ");"

但是这些都不起作用.

任何建议都值得赞赏..

Any suggestion is appreciated..

推荐答案

MyName := name
myTel := telphonenumber

$sSQL := "insert into myTable Values ('" MyName "', '" myTel "');"

我更希望将电话号码也放在撇号中. 如果您没有电话号码,则没有错误:

I prefer to put the phone number also into apostrophe. if you do not have a phone number then there is no error:

insert into myTable Values ('John', '' );

正如加里所说的那样:如果数字以0或...开头." 选择电话号码
0177 ... ,稍后会给您 177 ...

and as Gary said right: "If a number begins with 0 or ... issues." the select of the telephone number
0177... will give you later 177...

最好您也使用字符串作为电话号码,而不是数字格式.

better you also use a string for the phone number and not an number format.

create table myTable
(
    name TEXT
    phone TEXT
) ;

这篇关于如何使用autohotkey将值插入sqlite3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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