如何将8000个字符添加到记录集 [英] How I do to add 8000 characters to the recordset

查看:113
本文介绍了如何将8000个字符添加到记录集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格,我想从sql server 2000中感觉到那个网格.我想在adodb记录集中添加200列,其中包含8000个字符.我已经通过使用记录集来完成此操作,但是记录集有错误,无法为每个具有8000个字符的列获取数据.我是一个解决方案,如何从带有varchar列(8000)的sql server 2000中获取数据到记录集


代码是

I have the grid I want to feel that grid from the sql server 2000. I want to add a 200 columns with a 8000 characters in a adodb recordset. I have done this by using the recordset but there is error of recordset to fetch data for every column with 8000 characters. I what a solution how to fetch a data from sql server 2000 with a column of varchar (8000) to the recordset


Code for this is

Set recList = New ADODB.Recordset
    
    ' execute any SQL build statements
    If strSql3 & "" <> "" Then
        Dim lngResults As Long
        Call CmdExecuteSqlAsync(conn, Replace(strSql3, "___temp_table___", strTempTable), cmdCancel, _
            lblStatus, lngResults)
    End If
    
    recList.CursorLocation = adUseClient
    recList.CursorType = adOpenStatic
    recList.LockType = adLockBatchOptimistic

    recList.Properties("Initial Fetch Size") = 1
    recList.Properties("Background Fetch Size") = 1
    blnFetching = True
    strSQL = Replace(strSQL, "___temp_table___", strTempTable)
    recList.Open strSQL, conn, adOpenStatic, adLockBatchOptimistic, adAsyncFetch + adAsyncExecute
    lblStatus = Format(Now - dtmStart, "hh:mm:ss") & " elapsed, 0 record(s)"
    Do While blnFetching = True And cmdSearch.Enabled = False And recList.State > 1
        lblStatus = Format(Now - dtmStart, "hh:mm:ss") & Mid(lblStatus, InStr(lblStatus, " elapsed, "))
        Sleep 200
        SafeDoEvents
    Loop






//reclist是adodb记录集的对象






//reclist is the object of adodb recordset

推荐答案

SQL Server 2000的行大小限制为8060字节.因此,您不能插入200x8000个字符.
SQL Server 2000 has a row size limit of 8060 bytes. So you cannot insert 200x8000 characters.


已阅读本文

SQL 2000行大小 [ ^ ]

即使在SQL 2000中可以使用最多8000个字符的列,但每行大小不能超过8k.
have a read of this article

SQL 2000 row sizes[^]

Even though you can use columns size upto 8000 characters in SQL 2000 you cant exceed 8k per row in size.


这篇关于如何将8000个字符添加到记录集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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