PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008
Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008
Iniciado por guest, 04,jun. 2015 00:27 - 13 respuestas
Publicado el 04,junio 2015 - 00:27
Hi,

I have an app running on WD 19 on SQL Server 2008.

I purchased a copy of Native Access for SQL server and configured my app to use it.

I opened the application and everything seemed fine. So far so good.

However, in running some routine test all kinds of really weird and disturbing behavior started happening,

*multiple rows being created where only one should be (using HADD)
*query's gathering data that should be outside their scope.
* Basic queries failing that have no reason to fail.

All this worked perfectly connecting via OLEDB.

It's basically a tire fire and I don't know where to start.

Anyone else make this jump and experience anything similar, any advice?

Thanks!
Publicado el 04,junio 2015 - 02:31
Hi

I've been running sqlServer12 (64-bit on Windows764-bit)
from wb/wd17-19 with a charm.

Pls check if your installations are correct like

(Assuming you're using all 64-bit)
The wdxxxsqlserver64.dll DLL is
required for this use mode of the Native Access in 64 bits.

SQLnCli 10 with NativeSqlserver 64-bit for sqlServer2008 (64-bit)

and see links as below as fyi:

http://help.windev.com/en-US/…
http://help.windev.com/en-US/…
http://help.windev.com/en-US/…


Also, try create an analysis/table with native sqlServer connection selected and
generate RAD to test run and use HADD() 3-10 times in a row to test if it only adds
one or few records or not.

I guess it's akind of installation of native sqlServer issue.

HTH

King
Publicado el 04,junio 2015 - 03:56
Hi,

We use WD + MS SQL several years, with connection with OLEDB provider.

Why Native Access for MS SQL?

If for ompatibility with H() functions, forget it.

In my opinion the best option is OLEDB and queries with T-SQL. Best with store procedures.

Regards,
JJM
Publicado el 04,junio 2015 - 06:58
Jorge, the application was originally written in Postgres with native access and then migrated to MS SQL when we took it to market as that's what the first client wanted. OLE DB works fine for the most part but we are working now on a hosted solution for new clients and I'm looking for ways to increase app speed without a lot of re-write. I may have to re-think that now.

King, thanks for suggestions, it seems my big issue right now is that Hmodify within one of my procedures appears to be overwriting some data in rows that shouldn't even be being read. It's spooky.
Publicado el 04,junio 2015 - 07:58
I'm wondering if the pre-release SQL Server Native Access for WD 20 is wanky.
Publicado el 04,junio 2015 - 15:04
Steve,
Are you using 32/64 bits?
If in 32 bits did you test with sqlncli or dbnetlib?
If you are using sqlncli what is the version?
Did you try to force the use one another version using WD CLIENT VERSION?

http://doc.windev.com/en-US/…
http://doc.windev.com/en-US/…
Publicado el 04,junio 2015 - 16:18
I'm using 32 bit and sqlncli 2008.
Publicado el 04,junio 2015 - 16:35
if you want to have the same behavior as the oledb use WD CLIENT VERSION=2000
Publicado el 04,junio 2015 - 16:43
Quote
Paulo Oliveira

if you want to have the same behavior as the oledb use WD CLIENT VERSION=2000



Thanks Paulo, how does that Syntax work in my connect string?
Publicado el 04,junio 2015 - 17:16
something like:
HDescribeConnection("mssql",G_USERDB,G_PASSWORDDB,G_SERVERDB,G_DB,hNativeAccessSQLServer,hOReadWrite,"WD Connection Timeout = 300; WD Command Timeout=300; WD CLIENT VERSION=2000")
Publicado el 04,junio 2015 - 17:35
Steve,
You can run the profiler or in the case of the express version just download expressprofiler or some other tool like that and check what are the sql sentences generated by to native access in your Hmodify

Sometimes this is the only way to debug what the native access is doing.

http://expressprofiler.codeplex.com/releases/view/111894
Publicado el 04,junio 2015 - 17:50
Thanks! I appreciate all the help.
Publicado el 08,junio 2015 - 13:17
Steve

Why don't you try to use v29 native Sql on wd19 as your native wd20 drivers come with all<= v20 and if it works, it's the problem of perview version of wd20.

HTH

King
Publicado el 10,junio 2015 - 18:40
I've solved my issue. Apparently somewhere deep in the bowels of my projects analysis Windev though one of my tables (pretty much the most import table in the project) was using an Automatic Identifier (even though it was not visible on screen in IDE), while in reality I am using Identity columns in SQL Server. This is why the behavior was different between Native Access and OLE DB (which ignores automatic id's in WD)