Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert in access with vfp6
Message
From
19/04/2006 12:51:24
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
 
To
19/04/2006 09:38:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114563
Message ID:
01114649
Views:
11
Hi Jose,

If your commands are equal what you wrote here, so you forgot to pass cMotor variable. Try:
xselect = [insert into vehiculos articulo, chassis, tipo, marca, modelo, color, ano, placa, motor) 
values(&carti, &cchasi, &ctipo, &cmarca, &cmodelo, &ccolor, &nano, &cplaca, &cMotor)]
If isn't this, so what did error you receive?


>how I can make to insert a registry in a table of Access with vfp 6, I did it with ado object, but insert does not work with more of a field, it gives error me.
>
>pconn=createobject("ADODB.Connection")
>pconn.open(strconn)
>carti = '19999'
>cchasi = "HDHDGSS"
>ctipo = "CARRO"
>cmarca = "TOYOTA"
>cmodelo= "CAMRY"
>ccolor = "NEGRO"
>nano = "2005"
>cplaca = "ABDG32"
>cmotor = '763HSD'
>xselect=[insert into vehiculos(articulo,chassis,tipo,marca,modelo,color,ano,placa,motor) values(&carti,&cchasi,&ctipo,&cmarca,&cmodelo,&ccolor,&nano,&cplaca)]
>rstabla = createobject("ADODB.Recordset")
>oconn =pconn
>rstabla.cursorlocation = 3
>rstabla.cursortype = 2
>rstabla.locktype = 4
>rstabla.open (xselect,oconn)
Erick
Força Sempre!
Strength Always!
Previous
Reply
Map
View

Click here to load this message in the networking platform