|
I'm sorry. im new here.
will do next time. Thanks.
|
|
|
|
|
I'm new to C#,but I used VB.NET a lot ... This prject I have to do in C# and I allready have problems connecting to my SQL SERVER Database.
I put an combobox into my form which I want to link to some records in my database ...
So combobox.Datasource = ... Add Project DataSource ... Database ... Connection to my SQL SERVER Database ...
I saved the connection string as TSConnectionString ... Selected the tables and views I need from my database ...
and Visual Studio has created the files ... TSDataSet.xsd ( TSDataSet.Designer.cs , TSDataSet.xsc , TSDataSet.xss )
I mention that the combobox.DataSource property is still empty and the program can compile succesfully ... for now
When I come back to fill combobox.Datasource with TSDataSet namely tSDataSetBindingSource when i try to compile the
next error message pops up :
Error 1 The type name 'TSDataSet' does not exist in the type 'TSales.TSales'
... and the code behind this error is :
this.tSDataSet = new TSales.TSDataSet(); --------------- here is the error
this.tSDataSetBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.panTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tSDataSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tSDataSetBindingSource)).BeginInit();
this.SuspendLayout();
Remember though I wrote above that Visual Studio creates those 4 files (TSDataSet.xsd , TSDataSet.Designer.cs , TSDataSet.xsc , TSDataSet.xss ) and puts them in Solution Explorer
So my question is ... how come there is no tSales.TSDataSet ?
and what should I do to link those records to that combobox and other records to other controls in my form
Thank you
|
|
|
|
|
how did you put those file in solution?
|
|
|
|
|
|
|
the problem was elsewhere man ... I reolved changing the form name from TSales to Main ... anything else was just fine
|
|
|
|
|
Hi how can i get from oledb or sql data reader data to messagebox or a Textbox ?
Can someone gimme an example.
|
|
|
|
|
Please don't post your question twice. Your post has been answered in c# forum
|
|
|
|
|
I am totally new to .net. I'm trying to code for a simple search engine. But on debugging I am getting the following exception.
System.NullReferenceException: Object reference not set to an instance of an object.
Can any body help please?
|
|
|
|
|
Shireesha wrote: I am totally new to .net.
And apparently to using forums. Your question doesn't appear to have anything to do with SQL.
Your error says that you're trying to use a method or set a property on a null (C#) or Nothing (VB.NET) object. Trying asking this question in the forum of the language you're using and post a code snippet. Without it, it's impossible to tell you what you did wrong.
|
|
|
|
|
Hi
i have a problem in calculating Date Diffrence.
how can i calculate the Day diffrence of same Date.
first i tried this way:
eg: Select DateDiff(Day,'01/01/2007','01/01/2007')
this query will return Zero
Second i tried this way:
eg: Select DateDiff(Day,'01/01/2007 00:00:00','01/01/2007 23:59:59')
this also return Zero, But calculate the Hour diffrence, this will show 23 Hrs.
By
George Garvasis
|
|
|
|
|
This behaviour is expected. DATEDIFF returns the number of complete units between 2 values. As the difference between your 2 times is not a complete day, the difference is still 0.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi
Thank you for your valuable information.
then how can i calculate the day difference.
By
George Garvasis
|
|
|
|
|
If you want to round the difference between 2 dates to the nearest day, calculate the difference in hours, express the result as a fraction of whole days and round up/down as appropriate.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hello to Everybody,
I am Shireesha.Hey I'm Fresher to this .net world.I got a simple project.I'm trying it since from 5 days.The project is like Address ditactor .It contains a text box where the user enters a string then it will be followed to search button where it has to be get the connection to the data base(I'm Using Access).And in a Label I want the get the address.
Here how to provide the connection. Can any one plz plz plz suggest me
Regards
Waiting for answer
|
|
|
|
|
Hi there. Welcome to CodeProject.
First of all, you should give your posts more meaningful titles. Read the forum guidelines, specifically point no. 3. Also, textspeak is really annoying to read and makes you look unprofessional. If you have a question, use English.
Regarding your question, the following link[^] gives you a sample connection string for connecting to an Access database. You should use the classes in the System.Data.OleDb namespace to establish a connection. I suggest you read the documentation, make an attempt to solve the problem yourself and post again if you encounter further difficulties.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Like the other poster replied, use a more descriptive subject line and try to refrain from using textspeak.
http://www.connectionstrings.com[^] has alot of connection strings you can look at.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi,im having trouble for acsending order of my own language. Do i have to write a program for this ascending order or is it possible we can use query builder to create this sorting?
here my language letters in A to F.
?
?
?
?
?
?
it would be great if you can give me an idea too.
so much of happy ending...
|
|
|
|
|
Please rephrase your question. It makes no sense.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
IT SEEMS I MADE NO SENSE PHRASES IN RECENTLY POST. MY WORD IS PLEASE MAKE IT SENSE AS MUCH AS POSSIBLE. TIMES AND TIDES WAIT FOR NO SOUL .
im trying to make database application in our language, name was dhivehi, which supports in XP too. and its totally different from any other languages which has to be written in right to left. i was having trouble with sorting ascending order of this language letters in MICROSOFT SQL 2005.
my question is:
- Do i have to write a separate program or
- in SQL Query builder I can do sorting order?
anyone help me with an best and top level suggestion would be great indeed.
so much of happy ending...
|
|
|
|
|
I think you are asking about changing the collation.
See this link here:
Clickety[^]
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
Not sure if this should go under OS/Admin board or not but this seems to be the closest...
Anyway, I found out that the following is taking up 40MB... not a lot of space but ...
L:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\mssqlsystemresource.mdf
Is that normal? What's this?
Thanks
devy
|
|
|
|
|
My handy copy of the book with possibly the longest name all year, "Inside Microsoft SQL Server 2005: The Storage Engine" says that the mssqlsystemresource database is used to store executable system objects. It was created to allow very fast and safe upgrades simply by being replaced. Older versions of SQL Server had to run scripts during upgrades to modify the contents of system stored procedures in the master database.
If you want to see inside it, stop SQL Server, make a copy of the file and log file, then attach the copy using a new name.
See also "Resource Database" in Books Online/MSDN Library.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
I've never run into a case or have seen this happen, but does anyone know what will happen if an auto number reaches the limit of INTEGER?
|
|
|
|
|
If you're dealing with Microsoft Access, then the range for the autonumber is between
-2,147,483,648 and 2,147,483,647
So, it's highly unlikely you'll exhaust the autonumber field. One calculation I saw elsewhere, that I verified myself, shows that even if you added a record every second of every day of every year, it would take a little over 68 years to go from 1 to 2,147,483,647 in the autonumber field.
If you do manage to exhaust the field (due to some program error that starts adding fields uncontrollably), it probably will wrap around and start at -2,147,483,648.
I hope this helps.
|
|
|
|