.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

How can I use the Resolver.FindCompletions method in the R2 SMO release?

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Sql Server
 

I'm working on an application that allows users to author T-Sql in a text editor, and displays an Intellisense like popup as the user types. After discovering the SqlServer 2008 R2 Feature Pack, I downloaded the SMO portion of the release, as it appears that Microsoft made a bunch of APIs public and redistributable that can be used for this purpose. However, after playing with it, I'm looking for help with using the Resolver.FindCompletions method.

Specifically, I'm looking to understand the purpose of its ParseResult and IMetadataDisplayInfoProvider parameters. Is the idea that I parse my SQL query locally and pass the result to FindCompletions(), as opposed to giving it the SQL string directly? And what is expected for IMetadataDisplayInfoProvider? Also, how do I tell FindCompletions what SQL connection to access in order to derive a completions list? Are there examples somewhere that demonstrate how this function is intended to be used?

Thanks very much for any help,

-Craig




View Complete Post


More Related Resource Links

How can I get Resolver.FindCompletions, in the R2 SMO release, to return all metadata from a SqlServ

  

I've been using the advice from a previous thread on Resolver.FindCompletions (http://social.msdn.microsoft.com/Forums/en/sqlsmoanddmo/thread/a0800f09-4610-4890-af85-15cc7e49ac46) and for SqlServer 2k8, it works great. However, when connected to a SqlServer2k8 R2 instance, I'm seeing a problem where the completion list that's returned is missing items that I get when connected to plain 'ol Sql 2k8. The most glaring omission is tables; the completion lists for Sql 2k8 R2 never include them. Additionally, when typing a table and then pressing a dot, no completions are returned that display the table's columns (even though I do get columns when connected to a 2k8 instance).

Is there something else I need to do and/or add to the FindCompletions logic in order to get support for SqlServer 2k8 R2 instances? And what about SqlServer 2k5 instances?

Thanks very much,

-Craig


Exception Handling: StackFrame Capture not capturing last level method call in release mode

  

I am trying print the exception details frame by frame along with other debug info (code below). In the code as you can see the DummyCall3 throws and ApplicationException and the expectation is that the stack trace will have information regarding DummyCall3. Below are the behavior I am getting with .NET 4.

  • Using the "Debug" build, when I run it, I get expected results (DummyCall3 > DummyCall2 > DummyCall > RunTest)
  • Using the "Release" build however, the DummyCall3 method is somehow missing from the stack trace. Now I only get (DummyCall2 > DummyCall > RunTest)
  • I add a dummy statement in the DummCall3 method before I throw the exception, and rerun using "Release" mode and now it works as expected with strack trace info (DummyCall3 > DummyCall2 > DummyCall > RunTest)
  • If I switch the framework version to .NET 3.5 it works as expected in both Release and Debug modes?

I would like to know if this behavior is by design or a bug? if it is by design, what was the reasoning behind it. Appreciate any input on this.

 

  class StackFrameTest
  {
    public void RunTest()
    {
      

Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

Thinking about new C# method prototypes: object as dictionary

  
I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:

  

 Hello...

Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

[WebMethod]
        public static string aaa(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

        [WebMethod]
        public static string aaa1(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

 

 

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method

  

 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Using CreateNewUserWizard SendingMail method to email me, not applicatnt.

  

I have staff area of my site I am protecting with forms authentication using c# and .Net 4.0. What I want to do is let the staff members register on the site but instead of the confermation email being sent to them I want it sent to me so I can go in and approve it. I have been trying to use the SendingMail method  but can not figure out how to get it to email me instead of the person that registered. I have searched around this site and find many topics on the SendingMail method but none seem to properly address my issue. Can anyone help me out?


statement cannot appear outside of a method body

  

hi all,

  i am posting my vb.net problem .plz tell me how to resolve this :-


Dim conn As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString
    'Dim mysqlconnection As New SqlConnection(conn)
    'If mysqlconnection.State=ConnectionState.closed Then mysqlconnection.Open();
    'Dim mySqlcommand As New SqlCommand("select CategoryId,CategoryName from Categories", mysqlconnection)
    'Dim mySqlDataAdapter As New SqlDataAdapter(mySqlcommand)
    'Dim mydataSet As New DataSet()
    'mySqlDataAdapter.Fill(mydataSet);

    'Gridview1.DataSource=ds;
    'Gridview1.DataBind();
    'if mysqlconnection.State=ConnectionState.closed Then mysqlconnection.Open();

i m getting 5 errors in this code

declaration expected in mySqlDataAdapter.Fill method; Gridview1.DataSource=ds; Gridview1.DataBind();


Question in Get method in C#

  

I got a recent working code from client.I see errors in the get methods when i compile , below are some place where the error happens.Can any one help me out?

System.Environment.get_NewLine()

Error 2 'System.Environment.NewLine.get': cannot explicitly call operator or accessor C:\Documents and Settings\shankar\My Documents\Visual Studio 2008\Projects\DKCLwin\DKCLwin\LocalizationAdmin.cs 150 170 DKCLwin

Error 2 'System.Environment.NewLine.get': cannot explicitly call operator or accessor C:\Documents and Settings\shankar\My Documents\Visual Studio 2008\Projects\DKCLwin\DKCLwin\LocalizationAdmin.cs 150 170

Editor's Note: A Large Release Wave is Headed your Way

  

This month Howard Dierking discusses the coverage of Windows Server 2008, SQL Server 2008, and Visual Studio 2008.

Howard Dierking

MSDN Magazine Launch 2008


.NET Matters: Restart Manager and Generic Method Compilation

  

This month Stephen Toub answers questions pertaining to the Windows Vista Restart Manager API and generic method compilation.

Stephen Toub

MSDN Magazine April 2007


Test Run: Determining .NET Assembly and Method References

  

Before you can test any software system effectively, you must understand the system under test. If the system includes the Microsoft® . NET Framework, understanding the system under test includes understanding its assembly and method dependencies.

James McCaffrey

MSDN Magazine March 2006


.NET Delegates: Making Asynchronous Method Calls in the .NET Environment

  

One of the many great features of the .NET Framework is that it has asynchronous infrastructure built in. In .NET you can call any method asynchronously by defining a delegate for the method and calling the delegate's asynchronous methods. This is beneficial to your application because when a synchronous call is made, the calling thread is blocked until the method completes whereas an asynchronous call is made on a different thread, and this allows the original thread to continue its work while the asynchronous call is in progress.This article explains delegates in .NET and how to use them to perform asynchronous calls, eliminating age-old threading problems.

Richard Grimes

MSDN Magazine August 2001


Windows 2000: Asynchronous Method Calls Eliminate the Wait for COM Clients and Servers

  

Windows 2000 is the first version of COM to support asynchronous method calls, which permit clients to make nonblocking calls to COM objects and objects to process incoming calls without blocking the calling threads. COM clients benefit from asynchronous method calls because they can continue working while waiting for outbound calls to return. Objects benefit because they can queue incoming calls and service them from a thread pool. Our SieveClient and SieveServer sample apps demonstrate how to create and use asynchronous clients and servers in COM-based distributed applications.

Jeff Prosise

MSDN Magazine April 2000


GridView EmptyDataTemplate and FindControl Method

  

I have 2 textboxes, a dropdownlist and a button in the EmptyDataTemplate of a GridView control and when I click the button I want to get the text from the text boxes and DropDownList put it in the QueryString of a URL i redirect to, but I can't work out why the FindControl method cannot find the controls.  I am using the following code:

Dim ddlNumPpl As DropDownList = GridView1.FindControl("ddlNumPpl")

I get an "Object reference not set to an instance of an object" error though when I try to refer to the SelectedValue property of it though.  I would be very grateful if someone could let me know why the FindControl method can't find the control and what I should do to rectify it.

Many Thanks (in advance),

Raoul.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend