sqlConnection & intellisense

I defined a database in SQLEXPRESS, made tables and went to VS2005 C# browser to continue with my app. Naturally, I defined the connection in VS2005 Studio. I found to my surprise that the connection, dataset and dataadapter for this sql database were already in Intellisense dropdown menu.

I set up another database and went back to my C# environment, defined the connection in VS2005 and found that there was nothing in Intellisense pertaining to the second connection.

Why is it so I do not remember anything particular I did to get the first dataset present in IntelliSense.

Thanks.




Answer this question

sqlConnection & intellisense

  • GenesisX

    Well those objects are there in first dataset because are created, and second dataset doesn't have them. If you create a dataset using new Datasource wizard then probably you will have many objects as table adapter, four commands and ... . But if you create your dataset manually you will not have that. If you drag a table from server explorer, also some objects will be created, except that with wizard you have more options to set then with drag table aproach. There is a great books about this that will help you a lot, probably any book that have a chapter about databinding. Good one that i know about is Professional Databinding 2.0 from Addison Wessley.

  • xhy_China

    What is showing in Intellisence is based only on using statements of code file. So if you have described the location of your class that you want to be shown in intellisence, it will be there, if not it will not be there. If you write the exact name of Dataset(in this case) and trying to use it, C# 2005 IDE will help you to add missing "using" statement if you have a reference to that class.

  • jacknsa

    boban.s wrote:
    What is showing in Intellisence is based only on using statements of code file. So if you have described the location of your class that you want to be shown in intellisence, it will be there, if not it will not be there. If you write the exact name of Dataset(in this case) and trying to use it, C# 2005 IDE will help you to add missing "using" statement if you have a reference to that class.

    I also forgot to mention one thing. That DataAdapter for one of the tables in my first database offered me "Insert" command in IntelliSense menu after I put a dot behind it. It was all I actually needed. When I put "(" parenthesis behind if it gave me a list of parameters for the table columns (values) with data types, etc. I've never seen "Insert" command in IntelliSense under different circumstances so far.



  • JennyMQuinn

    boban.s wrote:
    What is showing in Intellisence is based only on using statements of code file. So if you have described the location of your class that you want to be shown in intellisence, it will be there, if not it will not be there. If you write the exact name of Dataset(in this case) and trying to use it, C# 2005 IDE will help you to add missing "using" statement if you have a reference to that class.

    I am sorry, I need to revisit the issue. What I see in my code does not match what you've said. Number one, I have never defined the first dataset via a "using" statement or any other. It was just there. It is still there. The "spelling" of the objects I found was totally new to me. For instance, the name of the database is "intraDay." I found names like: intraDayDataSet. I never defined it in there before. It comes up highlighted in the color that is defined in my options toolbox for such objects. When I put a dot behind it it gives me many other prompts: with the names of my Tables in there with objects like DataRows, etc. There is also intraDayDataSetTableAdapters object. How about that t is on the first level of hierarchy on par with intraDayDataSet. I found it a godsend to have all those object on hand. There is nothing like this for the second and subsequent databases.

    There is something fishy about it. Sorry.



  • Hrvoje Zlatar

    I've got O'Reilly's ADO.NET in a Nutshell from B. Hamilton & M. MacDonald (2003) but some of the statements I tried do not work anymore although it seems to be very logical.

    Honestly, I do not understand what you are talking about. There is no way, it seems, to create a dataset in SQLEXPRESS. I just checked again. Both databases have stored procedures but that's all.

    Every time I modify a stored procedure and try to save it SQLEXPRESS project manager tries to save a query ( ). I modified a procedure but somehow a query exists in the background also Quite weird. I already have a bunch of "queries" in my documents directory. They are all numbered. Some of the numbers are like: query14, etc. Then it tries to save a "query" under name "query2" It asks me if I want to overwrite it because a query2 is already there. I say "yes" most of the time. What is it all about



  • Tall Dude

    Thank you very much, boban.s

    It is not the first time you've saved my day.



  • sqlConnection & intellisense