Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
14
Erster Beitrag:
vor 3 Jahren
Letzter Beitrag:
vor 3 Jahren
Beteiligte Autoren:
steve erts, Paulo Oliveira, kingdr, Jorge, Kingdr

Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008:SOLVED

Startbeitrag von steve erts am 03.06.2015 22: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!

Antworten:

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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/?3044002&name=htransactionstart_function
http://help.windev.com/en-US/?5515003&name=Native_SQL_Server_Access
http://help.windev.com/en-US/?3044337&name=Transactions_CS


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

von Kingdr - am 04.06.2015 00:31

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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

von Jorge - am 04.06.2015 01:56

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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.

von steve erts - am 04.06.2015 04:58

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

I'm wondering if the pre-release SQL Server Native Access for WD 20 is wanky.

von steve erts - am 04.06.2015 05:58

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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/?5515003
http://doc.windev.com/en-US/?9000124

von Paulo Oliveira - am 04.06.2015 13:04

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

I'm using 32 bit and sqlncli 2008.

von steve erts - am 04.06.2015 14:18

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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

von Paulo Oliveira - am 04.06.2015 14:35

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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?

von steve erts - am 04.06.2015 14:43

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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")

von Paulo Oliveira - am 04.06.2015 15:16

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

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

von Paulo Oliveira - am 04.06.2015 15:35

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

Thanks! I appreciate all the help.

von steve erts - am 04.06.2015 15:50

Re: Weird behavior moving from OLEDB to Windev Native Access on SQL Server 2008

Steve

Why don't you try to use v29 native Sql on wd19 as your native wd20 drivers come with all

von kingdr - am 08.06.2015 11:17
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)

Once I delete the file from the analysis and then re-imported from SQL Server everything worked like a champ.

von steve erts - am 10.06.2015 16:40
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.