且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法将记录插入到vb.net中的sql server 2005数据库

更新时间:2023-02-07 09:06:33


阿卜迪

如果是 Number ,请提供 Id_Ruangan DataType ,然后应从 Me.id.Text


谢谢,
Imdadhusen
Hi,
Abdi

Please provide DataType of Id_Ruangan if it was Number then you should remove double quote from Me.id.Text


Thanks,
Imdadhusen


我可以看到一些事情,在加载事件中打开了一个连接.它没有关闭,但在按钮事件中再次称为打开...

如果Id_Ruangan是主键,则它将不接受重复项;如果它是自动增量字段,则无需插入它.提供是否有任何错误详细信息,我可以在此处改善答案.

没有提供命令类型的另一件事
A few things I can see, there is a connection opened at the load event. it is not closed, but again called open in button event...

If Id_Ruangan is a primary key it will not accept duplicates and if it is a autoincrement field you need not to insert it. Provide if any error details i can improve my answer here.

one more thing the command type is not given