構文エラーが発生します。
文字列 'OKWhere UerName=Sam' の後の引用符が閉じていません。'OKWhere UserName=sam' 付近の不正な Sysntax。
コード:
cmd.CommandText = "UPDATE SystemInfo SET" + " UserName='" + UserName + "',
UserDomainName='" + UserDomainName + "',UserMachineName='" + UserMachineName
+"',UserIP='" + UserIP + "', UserOsVersion='" + UserOsVersion +
"',UserSystemDirectory='" + UserSystemDirectory + "',UserCurrentDirectory='" +
UserCurrentDirectory + "', ProcessorName='" + ProcessorName + "',
ProcessMnufacturer='" + ProcessMnufacturer + "',ProcessorID='" + ProcessorID +
"',ProcessorDescription='" + ProcessorDescription + "',ProcessorVersion='" +
ProcessorVersion + "',ProcessorStatus='" + ProcessorStatus + "',ProcessorDeviceId='" +
ProcessorDeviceId + "', OSCaption='" + OSCaption + "',OSSerialNumber='" +
SSerialNumber + "',OSManufacturer ='" + OSManufacturer + "',OSVersion='" + OSVersion +
"', OSStatus='" + OSStatus + "',OSName='" + OSName + "', BiosName='" + BiosName +
"',BiosVersion='" + BiosVersion + "',BiosSerialNumber='" + BiosSerialNumber + "',
BiosManufacturer='" + BiosManufacturer + "',BiosCurrentlanguage='" +
BiosCurrentlanguage + "', BiosStatus='" + BiosStatus + "Where UserName=" +
UserName.ToString ();