odbc驱动程序不支持请求的属性VB6
I'm Giovanni, and I try to execute SQL Command on VB6.
我是Giovanni,我尝试在VB6上执行SQL Command。
But there was contains an error like this : "odbc driver does not support the requested properties"
但是包含这样的错误:“odbc驱动程序不支持所请求的属性”
Here is my SQL code on my program :
这是我的程序上的SQL代码:
dung = "SELECT pkg_guru.id_soal, soal_pkg.isi_soal, pkg_guru.jawaban, pkg_guru.kompetensi" & _
"FROM pkg_guru INNER JOIN soal_pkg ON pkg_guru.id_soal = soal_pkg.id_soal " & _
"WHERE pkg_guru.id_pkg = '" & F02_MulaiPKG.CBox.Text & "' AND pkg_guru.id_soal = '" & Val(txtno.Caption) & "' + 1 ORDER BY pkg_guru.id_soal ASC"
rsSoal.Open dung, cn, adOpenKeyset, adLockOptimistic, adCmdText
When I run on SQLYog Ultimate, the code work normally and shows it results
当我在SQLYog Ultimate上运行时,代码正常工作并显示结果
Can you tell me the solution?
你能告诉我解决方案吗?
Regards.
问候。
1 个解决方案
#1
2
The string:
字符串:
"...pkg_guru.kompetensi" & _
"FROM pkg_guru INNER JOIN soal_pkg ON pk
results in kompetensiFROM
which is invalid; add a space.
导致kompetensiFROM无效;添加一个空间。
The statement is vulnerable to SQL Injection attacks (passing a string variable containing '
) Use a parametrized query to avoid this.
该语句容易受到SQL注入攻击(传递包含'的字符串变量)。使用参数化查询来避免这种情况。
The firehose adopenstatic, adlockreadonly
options are better for a simple read-only recordset if thats what your after.
对于一个简单的只读记录集来说,firehose adopenstatic,adlockreadonly选项更好,如果这就是你的追求。
更多相关文章
- MySQL中的字符串模式匹配
- 从SQL字符串分割多桩分隔符
- ORACLE-SQL:定义并使用多字符串变量
- 关于mysql对字符串的数字的排序
- 不正确的字符串值:'\xF0\x9F\ xB6\xF0\x9F…' MySQL。
- 如何生成字符串'a'..'zzz'然后将它们保存到表中?
- SQL当执行插入操作时,字符串含有''的时候的处理
- AppScan安全问题解决方案
- mysql 拆分字符串,并count出字符串的长度