I'm working on a VB project and I need a solution/workaround to pass a long insert command to my access database. As I see things from here, there is a limit to the string length we can put in the CommandText and I actually have no idea as how to pass my long insert command in one shot.
I have included a copy of the code that I'm using to connect to my access db and also the insert script.
I don't have much time to try stuff. I need an immediate and practical/tested solution.
If you have any question, let me know right away. See bellow for actual code:
* * *
Set cnn1 = New [login to view URL]
strCnn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=" + "C:\UserSoft\[login to view URL]"
[login to view URL] strCnn
Set cmdSQL = New [login to view URL]
Set [login to view URL] = cnn1
* * *
[login to view URL] = "insert into AuditHard (ComputerId,LineNumber,HardType,UserId,Os,ServicePack,Product,Model,Serial,Processor,Family,Memory,CdRom,Hd,HdSize,VidAdapter,VidName,VidType,VidMemory,Dns,Adapter,Mac,Ip,Subnet,Gateway,SoundDevice,LastAuditDate) values"
[login to view URL] = [login to view URL] + "('" + ComputerId + "','" + Trim(Str(x)) + "','PC'," + UserId + "','" + OS + "','" + ServicePack + "','" + Vendor + "','" + Model + "','" + Serial + "','" + Processor + "','" + Family + "','" + Memory + "','" + Hd + "','" + HdSize + "','"
[login to view URL] = [login to view URL] + VidAdapter + "','" + VidName + "','" + VidType + "','" + VidMemory + "','" + Dns + "','" + Adapter + "','" + Mac + "','" + Ip + "','" + Subnet + "','" + Gateway + "','" + SoundDevice + "','" + Format(Now, "mm/dd/yyyy") + "')"
Set RsTemp = [login to view URL]()
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
Windows 2000 SP4
Access 2000 SR-1
VB 6