我想连接不是单行而是新行的 SQL 查询。
Conn.Execute "insert into users(" "FirstName," "LastName," "Address1," "Address2," ")values(" " UCase(txtfirstname.Text) &" , "& UCase(txtlastname.Text) &", " & UCase(txtaddress1.Text) & ", " & UCase(txtaddress2.Text) & " ")"
如何将它们连接成一个?
谢谢,
尤加尔
最佳答案
在 VB6 中,要进行续行,您可以使用 [空格][下划线] 结束一行。您还需要使用 & 将每行上的文本段连接在一起。所以该行看起来像这样:
Conn.Execute "insert into users(" _
& "FirstName," _
& "LastName," _
& "Address1," _
& "Address2" _
& ")values(" _
& UCase(txtfirstname.Text) & "," _
& UCase(txtlastname.Text) & "," _
& UCase(txtaddress1.Text) & "," _
& UCase(txtaddress2.Text) _
& ")"
关于mysql - 如何在vb6.0中以换行符连接sql查询?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5312126/