Hi all
I am trying to connect and insert into an Access 97 mdb file
with vfp 8 sp1

The connection works fine but the "insert" does not

Assume a simple Access 97 database "test"
with 1 table "test1"
with fields f1, f2, f3 each test 10 char

The simple test code is:

lcConnectString = "Driver={Microsoft Access Driver (*.mdb)};" ;
+"DBQ=c:\tmp\test.mdb;" ;
+"UID=admin;PWD=;"

gnHndl = sqlstringconnect(lcConnectString, .t.)

lcCmd = "insert into test (f1) values ('1234567890')"

? SQLExec(gnHndl, lcCmd)

=sqldisconnect(gnHndl)
return

anybody know why ?
this same code works fine in Access 2000 back at office

al

Re: Access insert failure by Sietse

Sietse
Mon Aug 09 10:00:29 CDT 2004

Hi Al,
What's the error information? Without this there's little chance to figure
out what's wrong.
Use the AERROR() function to retrieve the info

Sietse Wijker

"Al Marino" <amarino@NOT_THISgalaxymusic.com> wrote in message
news:uUnalCifEHA.140@TK2MSFTNGP12.phx.gbl...
> Hi all
> I am trying to connect and insert into an Access 97 mdb file
> with vfp 8 sp1
>
> The connection works fine but the "insert" does not
>
> Assume a simple Access 97 database "test"
> with 1 table "test1"
> with fields f1, f2, f3 each test 10 char
>
> The simple test code is:
>
> lcConnectString = "Driver={Microsoft Access Driver (*.mdb)};" ;
> +"DBQ=c:\tmp\test.mdb;" ;
> +"UID=admin;PWD=;"
>
> gnHndl = sqlstringconnect(lcConnectString, .t.)
>
> lcCmd = "insert into test (f1) values ('1234567890')"
>
> ? SQLExec(gnHndl, lcCmd)
>
> =sqldisconnect(gnHndl)
> return
>
> anybody know why ?
> this same code works fine in Access 2000 back at office
>
> al
>
>
>



RE: Access insert failure by Leemi

Leemi
Mon Aug 09 10:55:07 CDT 2004

Hi Al:

What error message do you get? If you look at the Aerror() function, doe
sit tell you anything?

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003

>Hi all
>I am trying to connect and insert into an Access 97 mdb file
>with vfp 8 sp1

>The connection works fine but the "insert" does not

>Assume a simple Access 97 database "test"
>with 1 table "test1"
>with fields f1, f2, f3 each test 10 char

>The simple test code is:

> lcConnectString = "Driver={Microsoft Access Driver (*.mdb)};" ;
> +"DBQ=c:\tmp\test.mdb;" ;
> +"UID=admin;PWD=;"

> gnHndl = sqlstringconnect(lcConnectString, .t.)

> lcCmd = "insert into test (f1) values ('1234567890')"

> ? SQLExec(gnHndl, lcCmd)

> =sqldisconnect(gnHndl)
> return

>anybody know why ?
>this same code works fine in Access 2000 back at office

>al


Re: Access insert failure by Al

Al
Mon Aug 09 10:59:08 CDT 2004

SORRY !
my code included the field as "fl" (f plus a lower case L)
instead of f1 (f plus the number 1)

I feel stupid (getting old s***)

al

"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
news:XV2u7kifEHA.3836@cpmsftngxa06.phx.gbl...
> Hi Al:
>
> What error message do you get? If you look at the Aerror() function, doe
> sit tell you anything?
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 Public Beta Now Available!! --*
> Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/
>
> *-- VFP8 HAS ARRIVED!! --*
> Read about all the new features of VFP8 here:
> http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
> Purchase VFP8 here:
> http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
> >Hi all
> >I am trying to connect and insert into an Access 97 mdb file
> >with vfp 8 sp1
>
> >The connection works fine but the "insert" does not
>
> >Assume a simple Access 97 database "test"
> >with 1 table "test1"
> >with fields f1, f2, f3 each test 10 char
>
> >The simple test code is:
>
> > lcConnectString = "Driver={Microsoft Access Driver (*.mdb)};" ;
> > +"DBQ=c:\tmp\test.mdb;" ;
> > +"UID=admin;PWD=;"
>
> > gnHndl = sqlstringconnect(lcConnectString, .t.)
>
> > lcCmd = "insert into test (f1) values ('1234567890')"
>
> > ? SQLExec(gnHndl, lcCmd)
>
> > =sqldisconnect(gnHndl)
> > return
>
> >anybody know why ?
> >this same code works fine in Access 2000 back at office
>
> >al
>



Re: Access insert failure by Al

Al
Mon Aug 09 10:58:38 CDT 2004

SORRY !
my code included the field as "fl" (f plus a lower case L)
instead of f1 (f plus the number 1)

I feel stupid (getting old s***)

al

"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:envqnGifEHA.2848@TK2MSFTNGP10.phx.gbl...
> Hi Al,
> What's the error information? Without this there's little chance to figure
> out what's wrong.
> Use the AERROR() function to retrieve the info
>
> Sietse Wijker
>
> "Al Marino" <amarino@NOT_THISgalaxymusic.com> wrote in message
> news:uUnalCifEHA.140@TK2MSFTNGP12.phx.gbl...
> > Hi all
> > I am trying to connect and insert into an Access 97 mdb file
> > with vfp 8 sp1
> >
> > The connection works fine but the "insert" does not
> >
> > Assume a simple Access 97 database "test"
> > with 1 table "test1"
> > with fields f1, f2, f3 each test 10 char
> >
> > The simple test code is:
> >
> > lcConnectString = "Driver={Microsoft Access Driver (*.mdb)};" ;
> > +"DBQ=c:\tmp\test.mdb;" ;
> > +"UID=admin;PWD=;"
> >
> > gnHndl = sqlstringconnect(lcConnectString, .t.)
> >
> > lcCmd = "insert into test (f1) values ('1234567890')"
> >
> > ? SQLExec(gnHndl, lcCmd)
> >
> > =sqldisconnect(gnHndl)
> > return
> >
> > anybody know why ?
> > this same code works fine in Access 2000 back at office
> >
> > al
> >
> >
> >
>
>