Okay im running this script, and im getting what appears to be out of order code execution, or some weird compile time crap. Anybody got ideas.OUTPUTSOMESN 10SOMEHOSTNAME 13HP Compaq dc7800 Convertible Minitower 38Hewlett-Packard 15DM\USERNAME 10Microsoft Windows XP Professional 332 1Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz 47C:\invlen.vbs(148, 2) Microsoft OLE DB Provider for SQL Server: String or binary data would be truncated.what the heck12.33 4What the hell2012 4127.0.0.1 1400:0F:FE:EC:1DD 17CompSerial, CompName, CompModel, CompManufacturer, CompUser, ScavengeDate, CompOs, CompServicePack, CompCpuName, CompCpuSpeed, CompRam, CompIp, CompMACHereIn functionWE GOT HERE SOMEHOWC:\>End OutputThe code Lines 98-118WScript.Echo CompName&" "&Len(CompName)WScript.Echo CompModel&" "&Len(CompModel)wScript.Echo CompManufacturer&" "&Len(CompManufacturer)WScript.Echo CompUser&" "&Len(CompUser)WScript.Echo CompOs&" "&Len(CompOs)WScript.Echo CompServicePack&" "&Len(CompServicePack)WScript.Echo CompCpuName&" "&Len(CompCpuName)wscript.echo "what the heck1"wscript.echo CompCpuSpeed&" "&Len(CompCpuSpeed)wscript.echo "What the hell"WScript.Echo ""&CompRam&" "&Len(CompRam)WScript.Echo CompIP&" "&Len(CompIP)WScript.Echo ""&CompMAC&" "&Len(CompMAC)Wscript.echo "CompSerial, CompName, CompModel, CompManufacturer, CompUser, ScavengeDate, CompOs, CompServicePack, CompCpuName, CompCpuSpeed, CompRam, CompIp, CompMAC"wscript.echo CompCpuName="Test"WScript.Echo "Here"UpdateDB=UpdateDatabase()the function UpdateDatabase() is on line 124-160 ishLines incldued below 136-153Set mConnection = CreateObject("ADODB.Connection")mConnection.Open SqlCon, SqlUser, SqlPass'Checks the databse for an existing recordSet mRecordset = CreateObject("ADODB.Recordset")mRecordset.open SqlSelect, mConnectionRecordCheck = mRecordset.bof'Decides either update or insert depent on the result of the record checkif RecordCheck = -1 Then WScript.Echo "WE GOT HERE SOMEHOW" mConnection.Execute SqlInsert This is the line with the errorElse mConnection.Execute SqlUpdate End IfWhy the hell is that error for that line appearing in the middle of my echo statements?[Edited on March 9, 2010 at 5:23 PM. Reason : dd]
3/9/2010 5:21:35 PM