Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

updating clipper database

0 views
Skip to first unread message

Vincent Haakmat

unread,
Jul 20, 2000, 3:00:00 AM7/20/00
to
Hi, I have these statements:
Const ConnectStringClipper = "Provider=MSDASQL.1;Persist Security
Info=False;Data Source=dBASE Files;Mode=ReadWrite;Initial
Catalog=C:\Database\Nagico"

strSQL = "UPDATE ngf010 SET poltyp=ucase(poltyp), status=ucase(status)"
With rstNGF010
If .State = adStateOpen Then .Close
.ActiveConnection = ConnectStringClipper
.CursorLocation = adUseClient
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Source = strSQL
.Open
End With

Running this will give me this error:

Runtime error:-2147467259(80004005)
[Microsoft][ODBC dBase Driver] Operation must use an updatable query

Any1 any ideas how I can still update the clipper/dbase table?

Thanks

Vincent


DarrylS

unread,
Jul 20, 2000, 3:00:00 AM7/20/00
to
Vincent,

Did you apply VB sp4. It returns the ability to WRITE to
dBase Tables.
SEE:
http://www.smithvoice.com/xb2kdemo.htm

Darryl S
"Vincent Haakmat" <vhaa...@sintmaarten.net> wrote in message
news:ODAFd0n8$GA.282@cppssbbsa05...

Trumphurst Ltd

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to
In article <ODAFd0n8$GA.282@cppssbbsa05>, Vincent Haakmat wrote:
> Hi, I have these statements:
> strSQL = "UPDATE ngf010 SET poltyp=ucase(poltyp), status=ucase(status)"
> With rstNGF010
> If .State = adStateOpen Then .Close
> .ActiveConnection = ConnectStringClipper
> .CursorLocation = adUseClient
> .CursorType = adOpenKeyset
> .LockType = adLockOptimistic
> .Source = strSQL
> .Open
> End With
>
> Running this will give me this error:
>
> Runtime error:-2147467259(80004005)
> [Microsoft][ODBC dBase Driver] Operation must use an updatable query

The query string you are using is an update query - it does not return any
rows, it just updates the database. You need to execute it, not use it to
open a cursor.

I am not sure if ucase is a built-in SQL function - it it is, the query will
work if you execute it. If it isn't, the query won't work, and you will have
to change the query to "SELECT polytyp, status from ngf010", open a cursor,
and loop through every record updating it.

--
Nikki Locke, Trumphurst Ltd. PC & Unix consultancy & programming
http://www.trumphurst.com/


Michael D. Long

unread,
Jul 22, 2000, 3:00:00 AM7/22/00
to

As indicated in another post, SP4 returns the ability
to write to dBASE files. However, you should be aware
that this will result in index corruption with Clipper, as
the dBASE driver cannot update them.

If the tables are used by an application that utilizes
Clipper format indexes, then the application will fail
to function as designed.

--
Michael D. Long
http://extremedna.homestead.com


"Vincent Haakmat" <vhaa...@sintmaarten.net> wrote in message
news:ODAFd0n8$GA.282@cppssbbsa05...

> Hi, I have these statements:

> Const ConnectStringClipper = "Provider=MSDASQL.1;Persist Security
> Info=False;Data Source=dBASE Files;Mode=ReadWrite;Initial
> Catalog=C:\Database\Nagico"
>

> strSQL = "UPDATE ngf010 SET poltyp=ucase(poltyp),
status=ucase(status)"
> With rstNGF010
> If .State = adStateOpen Then .Close
> .ActiveConnection = ConnectStringClipper
> .CursorLocation = adUseClient
> .CursorType = adOpenKeyset
> .LockType = adLockOptimistic
> .Source = strSQL
> .Open
> End With
>
> Running this will give me this error:
>
> Runtime error:-2147467259(80004005)
> [Microsoft][ODBC dBase Driver] Operation must use an updatable query
>

0 new messages