a pesar que creo campos con valor por default al momento de insertar me bota error si hago asi
- Code: Select all Expand view
cSQL := " insert into #ppru "
cSQL += "values('123456','T25CD',,,20.4444,120.00,,,'01','T25CD')"
pero si le paso valores a todos los campos inclusive a los campos con valor por defecto, no tengo falla de insercion
- Code: Select all Expand view
cSQL := " insert into #ppru "
cSQL += "values('123456','T25CD',0,0,20.4444,120.00,0,0,'01','T25CD')"
Asi trabaja ADO o es que estoy haciendo algo mal?
- Code: Select all Expand view
cSQL := "CREATE TABLE #ppru"
cSQL += "("
cSQL += "numero CHAR(6) NOT NULL, "
cSQL += "articu VARCHAR(10) NOT NULL, "
cSQL += "cantid int DEFAULT 0, "
cSQL += "mts INT DEFAULT 0,"
cSQL += "precio NUMERIC(12,4),"
cSQL += "total NUMERIC(10,2),"
cSQL += "unid int DEFAULT 0,"
cSQL += "stock int DEFAULT 0,"
cSQL += "codusu char(6) NOT NULL,"
cSQL += "subart varchar(10) "
cSQL += ")"
Try
oCon:Execute( cSQL )
Catch
MsgInfo( "Table Create ppru Failed" )
End try
cSQL := " insert into #ppru "
//cSQL += "values('123456','T25CD',,,20.4444,120.00,,,'01','T25CD')" ===> consigo error en la insercion
cSQL += "values('123456','T25CD',0,0,20.4444,120.00,0,0,'01','T25CD')" ===> sin error
Try
oCon:Execute( cSQL )
Catch
MsgInfo( "Fallo en la insercion" )
End try