|
so what the solution to solve that problem
md_refay
|
|
|
|
|
As I said, a Web Service. (WCF)
|
|
|
|
|
Build a web service application with database. Then host it after that you can do it. And also don't forget to insert reference of your web service in your windows application.
|
|
|
|
|
i have 3 or 4 goups in 4 towns
so
first where the database will be
second will they connect from application & communicate with database through web service??
third what about it's performance
i need your help
md_refay
|
|
|
|
|
Database will be in the server. Hosted in a static IP.
In application add web reference of that web service.
In web service write the functions for get and set the data. All database related interactions will be written in web service. Just access the web service and use the functions.
Performance depends on the server configuration, network speed, bandwidth.
|
|
|
|
|
hello
iam working on vs 2010 c# windows application
i want my application from different application on one database
so after search i found the good solution to work with vpn
but i don't know how to customize my application to work with vpn
i need your help
md_refay
|
|
|
|
|
Hi All !
I want to Export my dataset to a Text File With This Format :
000010103327742000000000002477000000000000000000
000020103545843004000000002477000000000000000000
000030103362063008000000002500000000000000000000
000040205918898005000000002477000000000000000000
that :
00001 is Row of Person
0103327742000 is Account Number
000000002477000 is the their Money
and other number:
000000000000000 is nothing
my code for this is :
int i;
String strDestinationTxtFile;
strDestinationTxtFile = "C:\\output.txt";
StreamWriter sw = null;
sw = new StreamWriter(strDestinationTxtFile, false);
foreach (DataRow row in dsBankPardakht.Tables["PersonPardakht"].Rows)
{
object[] array = row.ItemArray;
for (i = 0; i < array.Length - 1; i++)
{
sw.Write(array[i].ToString());
}
sw.Write(array[i].ToString());
sw.WriteLine();
}
sw.Close();
the problem is how can get this format( for Rows , moeny and Account Number and ...)
Thanks for any Help
|
|
|
|
|
Use String.Format()[^] to ensure your output fields are in the requisite format, rather than ToString() .
|
|
|
|
|
Thanks for your Reply , but I couldn't Use this correctly:
for (i = 0; i < array.Length - 1; i++)
{
sw.Write(array[i].ToString());
}
sw.Write(array[i].ToString());
Can you explain more about this
Best Regards !
|
|
|
|
|
Go to the link I posted, and study the String.Format() method, to see how it can produce the information in the format that you want. Since I have no idea what format your original data is in I cannot give a specific example.
|
|
|
|
|
Richard MacCutchan wrote: I cannot give a specific example.
C'mon! Give example code, it's urgentz!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Thanks a Lot !I use String Format and It's Works !
|
|
|
|
|
Hi,
I am new to Linq and I'm trying to access the MfgNumber after the query directly without a foreach loop. I don't need the foreach loop as the SQL query should be returning one result.
[Table(Name = "Mfg")]
public class Mfg
{
[Column(IsPrimaryKey = true)]
public string MfgName;
[Column]
public string MfgNumber;
}
...
var q2 =
from mfg in db.Mfg
where mfg.MfgName == Common.productPublisherName
select mfg;
foreach (var mfg in q2)
MfgNumber = mfg.MfgNumber;
How do I access the variables from the query without a foreach?
Thank you,
Glenn
|
|
|
|
|
This should meet your needs:
var q2 = from mfg in db.Mfg
where mfg.MfgName == Common.productPublisherName
select mfg.MfgNumber;
foreach (var string mfgNumber in q2) {
....
} I just re-read your post and realized you expect there to be (at most) one entry, so Mark's answer is the one you want.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: foreach (var string mfgNumber in q2) {
The OP did say without for loop
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: The OP did say without for loop The loop in my response processes the returned data - it doesn't extract it.
/ravi
|
|
|
|
|
The only thing your code does different from the OPs is return a single property of the object rather than the object as a whole. LINQ queries are not executed until requested such as when the GetEnumerator method is called in a for each statement. So, yes your statement does extract the data, then processes it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I just re-read the original post and realized he expects only one entry. My bad.
/ravi
|
|
|
|
|
Use Single if the query will return a single result. q2 will be of type Mfg
var q2 =(from mfg in db.Mfg
where mfg.MfgName == Common.productPublisherName
select mfg).Single();
or in case the query returns nothing create an object with default values, or null.
var q2 =(from mfg in db.Mfg
where mfg.MfgName == Common.productPublisherName
select mfg).SingleOrDefault();
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
In the main form, the button is disable that, after fulfilling the conditions in the external class must activate the button. can you help me? Thanks so much for all the advice. Mark
|
|
|
|
|
|
Hi,
I have a C# program (Green10) that runs fine on most every computer I've tried it on. But it doesnt run properly on a new computer I got.
I've downloaded and installed the .NET frameworks.
Any ideas what else it could be?
Thanks,
Green Lamar
www.GreenProductionss.com
modified on Friday, August 5, 2011 3:03 PM
|
|
|
|
|
Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Security settings, maybe?
And like Griff said, edit your post and get rid of that e-mail address, or you'll get spammed.
|
|
|
|
|
HighlanderGreen wrote: But it doesnt run properly
Might help to specify exactly what that means.
|
|
|
|