Error De Sintaxis 'ES UNA CLASE Q PERMITE EL ACCESO A DATOS Y TENGO UN PROBLEMA EN EL METODO 'INSERTAR , ME SALE UN MENSAJE QUE DICE ERROR DE SINTAXIS EN INSERT INTO 'CUSTOMER , LO HE CHEQUEADO TODO BIEN Y NO SE PORQUE SALE ESE MENSAJE,HABER SI 'LE PUEDES DAR UNA OJEADA PES BROTHER Y ME AVISAS------GRAX
Private mCon As ADODB.Connection
Private mFilas As ADODB.Recordset
Private mCOMM As ADODB.Command
Private mEnvoice As Long
Private mName As String
Private mStreet As String
Private mCity As String
Private mPhone As Long
Private mCell As Long
Private mDate As Date
Private mDelivery As Date
Private mMake As String
Private mModel As String
Private mSerial As String
Private mServiceR As String
Private mEstimate As Currency
Private mPaid As Date
Private mWarranty As Integer
Private mBack As Date
Private mCharge As Currency
Public Property Get ENVOICE() As Long
ENVOICE = mEnvoice
End Property
Public Property Get NAME() As String
NAME = mName
End Property
Public Property Get STREET() As String
STREET = mStreet
End Property
Public Property Get CITY() As String
CITY = mCity
End Property
Public Property Get PHONE() As Long
PHONE = mPhone
End Property
Public Property Get CELL() As Long
CELL = mCell
End Property
Public Property Get DATEX() As Date
DATEX = mDate
End Property
Public Property Get DELIVERY() As Date
DELIVERY = mDelivery
End Property
Public Property Get MAKE() As String
MAKE = mMake
End Property
Public Property Get MODEL() As String
MODEL = mModel
End Property
Public Property Get SERIAL() As String
SERIAL = mSerial
End Property
Public Property Get SERVICER() As String
SERVICER = mServiceR
End Property
Public Property Get ESTIMATE() As Currency
ESTIMATE = mEstimate
End Property
Public Property Get PAID() As Date
PAID = mPaid
End Property
Public Property Get WARRANTY() As String
WARRANTY = mWarranty
End Property
Public Property Get BACK() As Date
BACK = mBack
End Property
Public Property Get CHARGE() As Currency
CHARGE = mCharge
End Property
Public Property Get Filas() As ADODB.Recordset
Set Filas = mFilas
End Property
Private Sub Class_Initialize()
Set mCon = New ADODB.Connection
mCon.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=C:\Documents and Settings\Joseph\Mis documentos\Javier\JJ.MDB"
mCon.Open
End Sub
Public Sub mostrar()
Set mFilas = New ADODB.Recordset
With mFilas
.ActiveConnection = mCon
.CursorLocation = adUseClient
.Source = "Select * from CUSTOMER "
.Open
End With
If Not mFilas.EOF Then
mEnvoice = mFilas.Fields("Envoice")
mName = mFilas.Fields("Name")
mStreet = mFilas.Fields("Street")
mCity = mFilas.Fields("City")
mPhone = mFilas.Fields("Phone")
mCell = mFilas.Fields("Cell")
mDate = mFilas.Fields("Date")
mDelivery = mFilas.Fields("Delivery")
mMake = mFilas.Fields("Make")
mModel = mFilas.Fields("Model")
mSerial = mFilas.Fields("Serial")
mServiceR = mFilas.Fields("ServiceR")
mEstimate = mFilas.Fields("Estimate")
mPaid = mFilas.Fields("Paid")
mWarranty = mFilas.Fields("Warranty")
mBack = mFilas.Fields("Back")
mCharge = mFilas.Fields("Charge")
End If
End Sub
Public Sub insertar_newCustomer(eEnv As Long, nNam As String, sStr As String, cCit As String, pPho As Long, _
cCel As Long, dDat As Date, dDeliv As Date, mMak As String, mMod As String, sSer As String, sSR As String, _
sEst As Currency, sPa As Date, sWarr As Integer, sBac As Date, sChar As Currency)
Set mCOMM = New ADODB.Command
With mCOMM
.ActiveConnection = mCon
.CommandType = adCmdText
.CommandText = "INSERT INTO CUSTOMER (Envoice,Name,Street,City,Phone,Cell,Date,Delivery ,Make,Model,Serial,ServiceR,Estimate,Paid,Warranty ,Back,Charge)" & _
" VALUES (" & eEnv & ",'" & nNam & "','" & sStr & "','" & cCit & "'," & pPho & "," & cCel & "," & dDat & "," & dDeliv & ",'" & mMak & "','" & mMod & "','" & sSer & "','" & sSR & "'," & sEst & "," & sPa & "," & sWarr & sBac & sChar & ")"
.Execute
End With
End Sub
__________________ JUST DO IT!!!
nunk hay una segunda oportunidad para una primera buena impresion... |