473,383 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Compatibilité SQL Server 7 - SQL Server 2000 ?

Bonjour,

J'ai developpé une application sous VB.Net qui utilise un datagrid .

Ce datagrid utilise un dataTable d'un DataSet comme datasource. ce dataset
est rempli de la sorte :

'Debut du code

requete = "SELECT ln_nomencdtl_articleentree as 'Article', CASE WHEN
e.en_item_key IS NULL THEN po_nstk_desc ELSE en_item_desc END as
'Désignation', CASE WHEN e.en_item_key IS NULL THEN 'UN' ELSE uom_key END as
'Unité', CASE WHEN en_type_key IN(2, 10) THEN CASE " & poidsun & " WHEN 0
THEN ln_nomencdtl_quantite ELSE ln_nomencdtl_quantite * " & poidsun & " END
ELSE CASE " & poidsun & " WHEN 0 THEN ln_nomencdtl_quantite ELSE
ln_nomencdtl_quantite * " & poidsun & " END END as 'Qté Unités', CASE WHEN
en_type_key IN(2, 10) THEN (ln_nomencdtl_quantite * 100) ELSE 0 END as
'Qté', en_type_key FROM ln_nomencdtl_tbl d LEFT JOIN en_item_tbl e ON
d.ln_nomencdtl_articleentree = e.en_item_key LEFT JOIN po_nstk_tbl ns ON
d.ln_nomencdtl_articleentree = ns.po_nstk_key AND d.gl_cmp_key =
ns.gl_cmp_key WHERE d.gl_cmp_key='" & pGL_CMP_KEY & "' AND sf_plant_key='" &
pUsine & "' AND ln_nomenchdr_articlesortie='" & tArticlePF.Text & "' AND
ln_nomenchdr_ver='" & NumVer & "' AND ln_machine_idmachine = " & idmachine

da = New SqlDataAdapter(New SqlCommand(requete, sqlcn))

ds.Tables.Clear()

da.Fill(ds)

'Fin du code

Avec les déclarations qui vont bien...

Tout ce code fonctionne à merveille sur un Serveur SQL Server 7 sous Windows
NT4.

Par contre, lorsque je lance mon appli en me connectant à un Serveur Windows
Server 2003 avec SQL Server 2000, rien ne va plus: ca fonctionne -presque-
bien, sauf qu'il y a un moment, ou ma requete me remplit mon dataTable avec
0 (zero) ligne, alors qu'en executant ma requete dans un analyseur de
requete, elle me renvoie 7 lignes.

La base de données installée sur le serveur SQL Server 2000 est la copie
conforme de la base installée sur le SQL Server 7, et j'ai essayé les
différents niveaux de compatibilité disponibles (de 6.5 à 8.0), sans
resultat...

Quelqu'un a-t-il déjà vécu ce probleme? et si oui, avez vous une solution ?

Merci.
Nov 20 '05 #1
4 1571
Cor
Hello Ludocic,

This is an International, by agreement we use only the English language in
this newsgroup.

I do not see an error in the VB.language code, I would try it with a more
simpler Select if it has to do with the SQL7 - SQL2000 or NT - Server 2003

But you can better ask this question in English in the international
newsgroup

Microsoft.public.dotnet.framework.adonet

I hope this helps?

Cor

C'est un international, par accord que nous employons seulement l'anglais
dans ce newsgroup.

Je ne vois pas une erreur dans le code VB.language, je l'essayerais avec un
plus simple Select s'il doit faire avec le SQL7 - SQL2000 ou le NT - le
Server2003

Mais vous pouvez mieux poser cette question en anglais dans le newsgroup
international

Microsoft.public.dotnet.framework.adonet

J'espère que ceci aide?

Cor
Bonjour,

J'ai developpé une application sous VB.Net qui utilise un datagrid .

Ce datagrid utilise un dataTable d'un DataSet comme datasource. ce dataset
est rempli de la sorte :

'Debut du code

requete = "SELECT ln_nomencdtl_articleentree as 'Article', CASE WHEN
e.en_item_key IS NULL THEN po_nstk_desc ELSE en_item_desc END as
'Désignation', CASE WHEN e.en_item_key IS NULL THEN 'UN' ELSE uom_key END as 'Unité', CASE WHEN en_type_key IN(2, 10) THEN CASE " & poidsun & " WHEN 0
THEN ln_nomencdtl_quantite ELSE ln_nomencdtl_quantite * " & poidsun & " END ELSE CASE " & poidsun & " WHEN 0 THEN ln_nomencdtl_quantite ELSE
ln_nomencdtl_quantite * " & poidsun & " END END as 'Qté Unités', CASE WHEN
en_type_key IN(2, 10) THEN (ln_nomencdtl_quantite * 100) ELSE 0 END as
'Qté', en_type_key FROM ln_nomencdtl_tbl d LEFT JOIN en_item_tbl e ON
d.ln_nomencdtl_articleentree = e.en_item_key LEFT JOIN po_nstk_tbl ns ON
d.ln_nomencdtl_articleentree = ns.po_nstk_key AND d.gl_cmp_key =
ns.gl_cmp_key WHERE d.gl_cmp_key='" & pGL_CMP_KEY & "' AND sf_plant_key='" & pUsine & "' AND ln_nomenchdr_articlesortie='" & tArticlePF.Text & "' AND
ln_nomenchdr_ver='" & NumVer & "' AND ln_machine_idmachine = " & idmachine

da = New SqlDataAdapter(New SqlCommand(requete, sqlcn))

ds.Tables.Clear()

da.Fill(ds)

'Fin du code

Avec les déclarations qui vont bien...

Tout ce code fonctionne à merveille sur un Serveur SQL Server 7 sous Windows NT4.

Par contre, lorsque je lance mon appli en me connectant à un Serveur Windows Server 2003 avec SQL Server 2000, rien ne va plus: ca fonctionne -presque-
bien, sauf qu'il y a un moment, ou ma requete me remplit mon dataTable avec 0 (zero) ligne, alors qu'en executant ma requete dans un analyseur de
requete, elle me renvoie 7 lignes.

La base de données installée sur le serveur SQL Server 2000 est la copie
conforme de la base installée sur le SQL Server 7, et j'ai essayé les
différents niveaux de compatibilité disponibles (de 6.5 à 8.0), sans
resultat...

Quelqu'un a-t-il déjà vécu ce probleme? et si oui, avez vous une solution ?
Merci.

Nov 20 '05 #2
* "Ludovic Lemarinel" <lu**********************@hotmail.com> scripsit:
Bonjour,


Sorry, I don't understand anyhing. Nevertheless, I think this group is
the better place for your question:

ADO.NET group:

<news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet>

Web interface:

<http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microso ft.public.dotnet.framework.adonet>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Sorry, I made a mistake while selecting the newsgroup ;)

About my query, the problem does not appear all the time, but just from time
to time, with the same query:
Sometimes, it fills the dataTable with the needed records, and sometimes, it
doesn't fill, but the query always give results in Query Analyser (don't
know if it's his name in english !).

Any ideas ?

"Cor" <no*@non.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello Ludocic,

This is an International, by agreement we use only the English language in
this newsgroup.

I do not see an error in the VB.language code, I would try it with a more
simpler Select if it has to do with the SQL7 - SQL2000 or NT - Server 2003

But you can better ask this question in English in the international
newsgroup

Microsoft.public.dotnet.framework.adonet

I hope this helps?

Cor

C'est un international, par accord que nous employons seulement l'anglais
dans ce newsgroup.

Je ne vois pas une erreur dans le code VB.language, je l'essayerais avec un plus simple Select s'il doit faire avec le SQL7 - SQL2000 ou le NT - le
Server2003

Mais vous pouvez mieux poser cette question en anglais dans le newsgroup
international

Microsoft.public.dotnet.framework.adonet

J'espère que ceci aide?

Cor
Bonjour,

J'ai developpé une application sous VB.Net qui utilise un datagrid .

Ce datagrid utilise un dataTable d'un DataSet comme datasource. ce dataset est rempli de la sorte :

'Debut du code

requete = "SELECT ln_nomencdtl_articleentree as 'Article', CASE WHEN
e.en_item_key IS NULL THEN po_nstk_desc ELSE en_item_desc END as
'Désignation', CASE WHEN e.en_item_key IS NULL THEN 'UN' ELSE uom_key END
as
'Unité', CASE WHEN en_type_key IN(2, 10) THEN CASE " & poidsun & " WHEN
0 THEN ln_nomencdtl_quantite ELSE ln_nomencdtl_quantite * " & poidsun & "

END
ELSE CASE " & poidsun & " WHEN 0 THEN ln_nomencdtl_quantite ELSE
ln_nomencdtl_quantite * " & poidsun & " END END as 'Qté Unités', CASE WHEN en_type_key IN(2, 10) THEN (ln_nomencdtl_quantite * 100) ELSE 0 END as
'Qté', en_type_key FROM ln_nomencdtl_tbl d LEFT JOIN en_item_tbl e ON
d.ln_nomencdtl_articleentree = e.en_item_key LEFT JOIN po_nstk_tbl ns ON
d.ln_nomencdtl_articleentree = ns.po_nstk_key AND d.gl_cmp_key =
ns.gl_cmp_key WHERE d.gl_cmp_key='" & pGL_CMP_KEY & "' AND sf_plant_key='" &
pUsine & "' AND ln_nomenchdr_articlesortie='" & tArticlePF.Text & "' AND
ln_nomenchdr_ver='" & NumVer & "' AND ln_machine_idmachine = " &
idmachine
da = New SqlDataAdapter(New SqlCommand(requete, sqlcn))

ds.Tables.Clear()

da.Fill(ds)

'Fin du code

Avec les déclarations qui vont bien...

Tout ce code fonctionne à merveille sur un Serveur SQL Server 7 sous

Windows
NT4.

Par contre, lorsque je lance mon appli en me connectant à un Serveur

Windows
Server 2003 avec SQL Server 2000, rien ne va plus: ca fonctionne -presque- bien, sauf qu'il y a un moment, ou ma requete me remplit mon dataTable

avec
0 (zero) ligne, alors qu'en executant ma requete dans un analyseur de
requete, elle me renvoie 7 lignes.

La base de données installée sur le serveur SQL Server 2000 est la copie
conforme de la base installée sur le SQL Server 7, et j'ai essayé les
différents niveaux de compatibilité disponibles (de 6.5 à 8.0), sans
resultat...

Quelqu'un a-t-il déjà vécu ce probleme? et si oui, avez vous une

solution ?

Merci.


Nov 20 '05 #4
Cor
Hi Ludovic,

Real weird, but try it in the adonet group, I see a lot of messages and also
in the adonet group, but not yours problem, but you never know.

(Although do not have to much hope, your Select is very difficult to expect
an answer in a newsgroup)

I know one of the answers you will get:
use the dataadapter paramaters instead of the connection in the selects
string with &
And that advice I can give you here in advance.
(It makes it more readable I think)

Cor
Sorry, I made a mistake while selecting the newsgroup ;)

About my query, the problem does not appear all the time, but just from time to time, with the same query:
Sometimes, it fills the dataTable with the needed records, and sometimes, it doesn't fill, but the query always give results in Query Analyser (don't
know if it's his name in english !).

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
0
by: Chris Halcrow | last post by:
Hi I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP. I continually get the error 'cannot configure server' just at the end of the installation. I've tried the following: ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.