从类型"DBNULL" 到类型“Double”的转换无效(数据库中对应的 a3 或a5 没有数据是为空)
,请问我怎么处理!
VB.NET code:
Dim a1 As String = Nothing
Dim a2 As String = Nothing
Dim a3 As Integer
Dim a4 As String = Nothi ......
m_pConnect->BeginTrans();
strSql.Format("CREATE TABLE SysUser(lsh AUTOINCREMENT NOT NULL UNIQUE,PRIMARY KEY(lsh),userType BYTE)");
m_pConnect->Execute((_bstr_t)strSql,NULL, adExecuteNoRecords);
这样建表就成功,
把sql语句换成
strSql.Format("CREATE TABLE SysUser(lsh ......
sql语句:
SELECT top 12 Forum.ID,Forum.topic,Reforum.id,Reforum.username,Reforum.posttime,Reforum.postip,Forum.username from Forum INNER JOIN Reforum ON Forum.ID = Reforum.topicid where Forum.forumid not in (62,64,65,66) order by Reforum.ID desc
实现结果:
forum.id ......
//**********************************
//程序功能:创建Access数据库和数据表
//**********************************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComObj, ADODB, StdCtrls;
typ ......
“First-chance exception in Line_List.exe: 0xC0000005: Access Violation.”
显示是else if (_Refcnt(_Ptr) == 0 || _Refcnt(_Ptr) == _FROZEN)
allocator.deallocate(_Ptr - 1, _Res + 2);
这块出错了。
断点查找对应的程序段落为:“p->Next=L->Next;
......
问题如下:
用查询语句
select * from tab where fil like 'CK090902'能查找出一条记录并显示出来
改为
select * from tab where fil = 'CK090902'
就不能查找到,也显示不出来
执行delete from tab where fil like 'CK090902',提示:找不到匹配的记录
执行del ......