|
Try dispQuestions.Count() instead.
|
|
|
|
|
The problem here is that you're mixing up the query syntax and the method syntax[^]. When the compiler is complaining that you're missing a select , it means that a query-syntax query must end with a select statement, but you've tried to fix it by adding a call to the Select method.
Your query could be written in one of two ways:
var dispQuestions = (from m in demographicList where m.customertype == "Patient" select m).ToList();
var dispQuestions = demographicList.Where(o => o.customertype == "Patient").ToList();
I tend to prefer the second option, but it's a purely aesthetic choice.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
.Net WPF app connecting to SQL 2008 R2 running on Win Server 2008
This is a recent problem. Probably started in the last day or two. Not sure because I haven't tested on the server since...
I have a WPF app that runs on a Win 8 Tablet. I have the tablet on my desk. I also have a copy on my client's server in Canada.
From my development PC the app CAN connect to SQL on my server. I copy the app to the tablet and run it and it does NOT connect. I get:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
I get the same trying to run it from the client's server. Both the tablet and the copy on the client's server were connecting a few days ago.
The server's IP/Port are hardcoded in (to test), so that hasn't changed.
I checked all the user remote connection settings. Everything looks fine. The part that worries me is the "File not found" part. And why do I NOT get this connecting from my Dev pc??
I need some help.
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
|
|
"The server's IP/Port are hardcoded in (to test), so that hasn't changed."
And that's a public IP address somewhere on the web where it can be reached without restrictions? Or is it something like 192.168.0.42?
|
|
|
|
|
Bernhard Hiller wrote: And that's a public IP address somewhere on the web
Given that the OP said that it worked a couple of days ago and hasn't changed it thus follows that it is a public address.
|
|
|
|
|
I have built a table in the database.But what is the reason that I can't insert data.
|
|
|
|
|
Telepathy is a wonderful concept but it just doesn't work properly!
What database?
What is the error message?
What is you UI?
Just a little more information may help someone make a guess at the problem.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you need help, you have to answer a proper question first
|
|
|
|
|
Can you please give us more details like UI code that you are using, Table Structure etc... so that we can help you to cross your obstacle.
Mani Prabhakar
|
|
|
|
|
in sql you have use from :
INSERT INTO table name VALUES ( , , ,
|
|
|
|
|
|
I'm not going to click any link what so ever containing the words crocko.com
You'd better store your picture on flickr or picasa or something similar, before your post or even account get voted as spam and disabled.
Be excellent to each other. And... PARTY ON, DUDES!
Abraham Lincoln
|
|
|
|
|
If they are on the same server use SSMS.
Select *
into DatabaseName.dbo.DestinationTableName
from DatabaseName.dbo.SourceTableName
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
That answer does not seem to relate to the original question. The image link does not work!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Sorry my net nazi won't allow access to that site.
Just type out the error message like everyone else instead of faffing around with images!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Pictures uploaded to Flickr are by default set as private.
Log into Flickr and set the permissions and the link will probably work.
Be excellent to each other. And... PARTY ON, DUDES!
Abraham Lincoln
|
|
|
|
|
Mycroft Holmes wrote: on the same server
And in the same instance too.
|
|
|
|
|
PIEBALDconsult wrote: And in the same instance too
Assumed I think installing multiple instances are a little beyond the OPs skills.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you mean SQL Server 2005, and if you have SSMS (which you should), you can use that to do it.
Right-click on the source database | Tasks | Export data... | Next | Select the destination server (instance) and database | Next | Next | Select the table(s) to copy
you should be able to go from there.
|
|
|
|
|
Depends on what you mean by "fastest".
If you mean the way that takes you the least amount of time then it depends on your experience.
If you mean something where there are large amounts of date, then database import/export tools are often fastest. If small amounts of data then any mechanism will likely take the same time as any other.
|
|
|
|
|