|
thanks in advnaced!
But i wanna to return all cells of my datatable !
(Not filter some !!! [No where])
|
|
|
|
|
Then just remove the where part of the second example I gave.
|
|
|
|
|
I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called.
My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?
|
|
|
|
|
|
classy_dog wrote: show me code on how to call the windows api An impossible task, since the code for each function is unique to that function. Go to MSDN, search for the function you are interested in, and read the documentation.
Use the best guess
|
|
|
|
|
What functions in the Windows API are you wanting to call?
|
|
|
|
|
I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?
|
|
|
|
|
Unless you are working for Microsoft, the other programmer is not writing a Windows API. And yes, you should ask her how her "API" should be called.
|
|
|
|
|
|
classy_dog wrote: Should I ask her how to call the windows api? Let's dub it the "Classy API"
using System.Windows.Forms;
using Microsoft.Win32;
using Classy;
using Classy.Dog;
using Classy.Core;
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to write a C# WPF application using visual studio 2010. I want to be able to allow the user to do the following:
1. enter some data,
2. select a file from a directory path,
3. error message will be displayed if the user enters wrong data,
4. the user will hit the submit button and call a windows api.
Thus can you tell me how to accomplish this goal?
|
|
|
|
|
Create a WPF project in Visual Studio. Write some code. Beyond that, it's up to you.
|
|
|
|
|
In addition to Pete's comments, if you head over to the articles section you will find plenty of good samples of Windows forms applications, and how to use the various controls. Alternatively look here[^] and here[^] on MSDN.
Use the best guess
|
|
|
|
|
|
I'm having the toughest time finding / figuring out how to get remote powershell working with 2012.
Currently this is my code:
private void OpenRunspace(string username, string password, ref Runspace remoteRunspace)
{
SecureString pass = new SecureString();
foreach (char c in password.ToCharArray())
{
pass.AppendChar(c);
}
PSCredential psc = new PSCredential(username, pass);
WSManConnectionInfo wmci = new WSManConnectionInfo(new Uri("http://" + ConfigurationManager.AppSettings["ExchangeServer"] + "/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", psc);
wmci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
wmci.ProxyAuthentication = AuthenticationMechanism.Negotiate;
wmci.SkipCACheck = true;
wmci.SkipCNCheck = true;
remoteRunspace = RunspaceFactory.CreateRunspace(wmci);
}
The error I keep getting is "Access is denied". I've verified the credentials I am passign to it is part of the REmote Management Users group on that local server, ran the Set-User "Administrator" powershell enabled command in Exchange 2013
What else am I missing here?
|
|
|
|
|
Hi,
I have working C# winform application ,
I need access the database name userid,password in
variaus sysetems SQL Server's current DB Name UID, PWD
thanks,
Senthil Kumar
|
|
|
|
|
What is the exact problem? It is not really clear.
What have you tried, where are you stuck?
Please improve the question if you want us to help you.
|
|
|
|
|
My Question is How to change the connection string externally... i use a txt file and change the uid,pwd in client place... is there any other ways to set the sql DB,UID,Pwd
thanks
|
|
|
|
|
You can use the web.config or app.config files for that. They are accessed through the ConfigurationManager class.
They are XML based files and have several sections that ConfigurationManager can read. One of those sections is "ConncectionStrings" (or something similar.)
See here[^] and here[^] and here[^]
hope this helps.
|
|
|
|
|
You're going to have to be a lot more specific about what you're looking for. A database in SQL Server doesn't have a username and password. Even if it did, there's no way for you to get the password for any SQL Server account.
|
|
|
|
|
My Question is How to change the connection string externally... i use a txt file and change the uid,pwd in client place... is there any other ways to set the sql DB,UID,Pwd
thanks
|
|
|
|
|
A connection string is just a string of characters. If you need to change the userId and password used to connect to the database, just create your connection string and inclue easily replacable tabs where the username and password would normally go. Then it's just a very simple search and replace for those tags. For example:
Server=SomeSqlServer;Initial Catalog=SomeDatabase;Username={USERNAME};Password={PASSWORD}
Then you just replace the "{USERNAME}" and "{PASSWORD}" strings with their actual values:
string connString = configurationConnectionString.Replace("{USERNAME}", username).Replace("{PASSWORD}", password);
|
|
|
|
|
Hi,
I have a Windows Form application which connects to MySQL database.
In connection string, do you recommend to use the root as user or create a different user or have a separate MySQL user for every user in the company?
and does it make any difference in performance and security of my .NET WinForm application?
Technology News @ www.JassimRahma.com
|
|
|
|
|
We DO have a database-forum.
|
|
|
|
|
Using the root account for application access in any DB system is a very high security risk and doing so will probably get you fired as a developer.
Create an account in the DBMS specifically for your application to use and give it permissions to only the objects and accesses that it needs.
Does it make any difference in performance?? No. It's just an account that provides access to things.
Does it effect the security of your application?? No, but it DOES effect the security of the data you put in the database(s).
|
|
|
|