簡體   English   中英

ORA-00917:VB中缺少逗號錯誤

[英]ORA-00917: Missing Comma error in VB

嘗試寫入數據庫時​​,嘗試獲取一些VB代碼在Excel中工作時遇到很多麻煩。 我一直收到這個逗號錯誤,但是我一生都看不到逗號缺失的地方...代碼在這里...

While Not IsEmpty(startRange.Offset(i, 0))

    tentype = startRange.Offset(i, 0).Value
    tendelivery = "EMAIL"
    tenevent = startRange.Offset(i, 1).Value
    tentext = startRange.Offset(i, 2).Value
    tensubject = startRange.Offset(i, 3).Value
    tentrailer = startRange.Offset(i, 4).Value
    tenlanguage = startRange.Offset(i, 5).Value
    tenid = 10 + i




With objCommand
.ActiveConnection = "Driver={Microsoft ODBC for Oracle};Server=*;Uid=*;Pwd=*"
.CommandText = "INSERT INTO TEN_TEMPLATE VALUES (" & tenid & ", " & tendelivery & ", " & tentype & ", " & tenevent & ", " & tentext & ", " & tenlanguage & ", " & tensubject & ", " & tentrailer & ")"
.Execute

End With

    i = i + 1
Wend

我將不勝感激任何幫助。

謝謝,布雷特

您的價值觀之一可能包含逗號,或者更可能是引號? 即使您的建築物看起來不錯,也可能會弄亂產生的SQL字符串。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM