PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > Re: Set no_browsetable on ?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: Set no_browsetable on ?

Réponse
 
LinkBack Outils de la discussion
Vieux 14/09/2007, 15h29   #1 (permalink)
raymond_b_jimenez@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SET NO_BROWSETABLE ON ?

On 29 Ago, 22:38, Erland Sommarskog <esq...@sommarskog.se> wrote:

>
> SqlClient does not send this by default, if you use CommandBehaviour.KeyInfo
> it does.
>

For all the docs I've seen till now, KeyInfo really seems like the
most interesting option. A couple of remarks:
1-I use an ExecuteReader with no parameters, so no CommandBehavior is
being used.
2-I do not see any "SET FMTONLY OFF" being executed, despite some
people complaining about that on the net. If one sees
http://msdn2.microsoft.com/en-us/lib...dbehavior.aspx
it would also be appearing in my case.

I'm now looking into the SqlCommand and SQLConnection classes to see
if something can make the "SET NO_BROWSETABLE ON" disappear. Anyone
got a clue?

rj

  Réponse avec citation
Vieux 14/09/2007, 22h18   #2 (permalink)
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SET NO_BROWSETABLE ON ?

(raymond_b_jimenez@yahoo.com) writes:
> For all the docs I've seen till now, KeyInfo really seems like the
> most interesting option. A couple of remarks:
> 1-I use an ExecuteReader with no parameters, so no CommandBehavior is
> being used.
> 2-I do not see any "SET FMTONLY OFF" being executed, despite some
> people complaining about that on the net. If one sees
> http://msdn2.microsoft.com/en-us/lib...dbehavior.aspx
> it would also be appearing in my case.
>
> I'm now looking into the SqlCommand and SQLConnection classes to see
> if something can make the "SET NO_BROWSETABLE ON" disappear. Anyone
> got a clue?


Since I don't see SET NO_BROWSETTABLE ON in my test setup, it's a bit
difficult to advice. Maybe you can post a sample program which produces
the dreaded NO_BROWSETABLE? Preferrably this should be a simple
command-line program without GUI.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Vieux 24/09/2007, 16h21   #3 (permalink)
raymond_b_jimenez@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Set no_browsetable on ?

There is some hope... I've put my code in a new test environment, and
it does not issue "SET NO_BROWSETABLE ON". I've debugged the situation
further, and found some interesting differences doing some networking
debugging (using Wireshark):

-When I connect in the production environment, the one that gets "SET
NO_BROWSETABLE ON", the "App Name" is set to "Microsoft (R) .Net
Framework" and "Library Name" is set to OLEDB
-When I connect in the testing environment, both "App Name" and
"Library Name" are set to ".Net SqlClient Data Provider".

The "App Name" that appears in Wireshark is the same that appears in
SQL Profiler.

An adapted code example follows:
-----------------------------------------
Dim SQLConx As SqlConnection = New SqlConnection
Dim SQLCom As SqlCommand = New SqlCommand
Dim SQLDR As SqlDataReader

Try
SQLCom.Connection = SQLConx
SQLCom.CommandType = System.Data.CommandType.StoredProcedure
SQLCom.CommandText = "myStoredProcedure"
SQLCom.Parameters.Add("@param", _param)
SQLConx.ConnectionString = SQLConnectionString
SQLConx.Open()
SQLDR = SQLCom.ExecuteReader()
SQLConx.Close()
Catch exc As Exception
-----------------------------------------

What's stranger is the OLEDB reference. I'm not using it in my code,
but it appears in the network trace. What might I be missing?

rj

  Réponse avec citation
Vieux 24/09/2007, 23h19   #4 (permalink)
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SET NO_BROWSETABLE ON ?

(raymond_b_jimenez@yahoo.com) writes:
> -When I connect in the production environment, the one that gets "SET
> NO_BROWSETABLE ON", the "App Name" is set to "Microsoft (R) .Net
> Framework" and "Library Name" is set to OLEDB


Apparently you are using OleDbConnection etc in production. With OleDb
Client you may experience NO_BROWSETABLE more often.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h53.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,56124 seconds with 12 queries