gpt4 book ai didi

compiler-errors - 这怎么了? Submit.CommandText = SQL?

转载 作者:行者123 更新时间:2023-12-02 11:05:28 27 4
gpt4 key购买 nike

昏暗的SQL作为字符串

sql = "insert into transactions (`transid`) values('" + Text1.Text + "')"
sql = sql & "; insert into customer (`custid`) values('" + Text2.Text + "')"
sql = sql & "; insert into customer (`custname`) values('" + Text3.Text + "')"
sql = sql & "; insert into transactions (`custid`) values('" + Text2.Text + "')"
sql = sql & "; insert into transactions (`serviceid`) values('" + Combo1.Text + "')"
sql = sql & "; insert into transactions (`empid`) values('" + Combo2.Text + "')"
submit.CommandText = sql

我应该在Submit.CommandText = sql中输入什么,我听不懂这部分。请帮助我。 :)

最佳答案

看来您可以将其简化为:

sql = "insert into transactions(transid, custid, serviceid, empid) _
values('" + Text1.Text + "','" + Text2.Text + "', '" + Combo1.Text + "', '" + Combo2.Text "');"
sql = sql + " insert into customer(custid, custname) values('" + Text2.Text + "', '" + Text3.Text + "');"

关于compiler-errors - 这怎么了? Submit.CommandText = SQL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15697329/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com