Creating a DataTable

Posted on 2005-05-13
Medium Priority
Last Modified: 2010-04-16

I am creating a console app in VS.NET and my using statements are:

using System;
using System.Data;
using System.Data.SqlClient;

However when i write "DataTable dt = new" and click space, Visual Studio does not bring up DataTable automatically. After that on the next line when i use "dt." nothing appears after the dot.

Am i missing some other using statement?

Question by:Kokas79

Assisted Solution

aymansoft earned 60 total points
ID: 13995379
re install visual studio.net and
try to write

DataTable dt = new DataTable
you can use dt object

Author Comment

ID: 13995408
well it works fine with other things like DataAdapter....i will try to see on my other machine. But i want to avoid re-installing!

Expert Comment

by:Diego Pazos
ID: 13997761
Does it compile or is it just intellisense that fails?
If it doesn't compile, did you try removing the 'using' statement and declaring it as 'System.Data.DataTable' instead?
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Assisted Solution

sammmyg earned 120 total points
ID: 13998052
does the project compile without that line?

if you have a syntax error above the line in question, intellisense will act up.

Accepted Solution

Diego Pazos earned 180 total points
ID: 13998168
The error doesn't necessarily have to be above. Any error that prevents the CLR from parsing the file can potentially cause intellisense to stop working. That's why I was asking.

What I'd suggest is write it anyway and check the task list. If that is the only error, you should start to worry.
If it is not, check all other errors first.

Author Comment

ID: 13998219
damn thing works now...all i did was removed the project and added a new one...!

sorry guys for wasting your time...i will give extra points

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 17 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question