一般这个应该是ID...你查下你的contents 的自动编号的ID,是不是你里面所写的排序为IP
也就是说,应该写成select * from contents order by ID desc...
如果不是这个错,请追问。
封装 SqlConnection,定义成Static ,或者用singletonpublic class CustomisedConnection
{
public static CustomisedConnection ConnectionInstance = new CustomisedConnection()
SqlConnection _conn
private CustomisedConnection(){_conn = new SqlConnection()}
}
调用CustomisedConnection.ConnectionInstance 就好了
添加一个模块,添加引用,Microsoft ActiveX Data Object 2.0 Library 把下面这些放入模块中Dim mycon As New ADODB.Connection
Dim myrs As New ADODB.Recordset
还不行,你就把myrs.Open "authors", mycon, adOpenStatic, adLockOptimistic, adCmdTableDirect
改为
myrs.Open "authors", mycon, 3,1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)