|
What I have used is a join to code does the count first. I was hoping for another way to do it.
|
|
|
|
|
What is the format of the connection string used for Mysql access in PHP?
|
|
|
|
|
|
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Mani Prabhakar
|
|
|
|
|
Hi,
For some reason no matter what I try, this syntax is erroring out.
var dispQuestions = (from m in demographicList.Where(o => o.customertype=="Patient")).ToList();
It complains having a select or group by.
I tried this as well, and it still errors.
var dispQuestions = (from m in demographicList.Where(o => o.customertype=="Patient")).Select().ToList();
any thoughts?
|
|
|
|
|
vkEmerson wrote: I tried this as well, and it still errors.
What's that? always include those details in your questions. Besides you have posted your question in wrong forum. Try LINQ forum[^]. Now don't repost this question there, leave it now. Hereafter choose right forum.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
I could not find the LINQ forum, under the discussion. I will book mark the linq forum for future.
if I try to get
dispQuestions.Count , there is an error message,
Error 5 Operator
Syntax wise, am I missing the format? I am used to ADO.Net, and new to Linq. Trying to figure the various way to write it.
Thanks.
|
|
|
|
|
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
|
|
|
|
|