我有一个问题,因为我可以把这套软件输入一个q服务器数据库:
司机:[Microsoft][SQLServer 2000司机]
public int sendCabecera(String tpv, Date date, String time, int NumPers, int CodOfi) {
java.sql.DatabaseMetaData dm = null;
int result = 0;
try {
connection = this.getConnection();
if (connection != null) {
dm = connection.getMetaData();
Statement select = connection.createStatement();
String sql="INSERT INTO TCabecerasSolicitudes(CodigoTPV, FechaYHora, Hora, NumeroPersonas, CodigoOficina) VALUES ( 001 , 17/08/2011 16:00 , De 16 a 17 ,0, 001 );";
select.execute(sql);
//{.... catch ... etc }
Well I have tried all execute update and execute alone and I always het the same error: "Cannot insert NULL" this is the first comlumn which is a primary key and normally auto-increment so I just ignore it but it doesn t work why???
Thanks a lot in advance,
www.un.org/Depts/DGACM/index_spanish.htm EDIT:问题已经解决,我不认为所涉关键点是自动加固的。