|
It didn't throw any error. its not updating the new values of app.config file.
|
|
|
|
|
Where are you verifying these new values? Are you looking in the app.config file that's part of your solution? It won't update the *default* values
Save, then Reload, then verify. Using code, not using the IDE.
Bastard Programmer from Hell
|
|
|
|
|
My app.config contains the below settings.
<applicationSettings>
<LibClient.Properties.Settings>
<setting name="LibClient_WebReference_CRService" serializeAs="String">
<value>http:
</setting>
</LibClient.Properties.Settings>
</applicationSettings>
I changed the port value in given url. like http://localhost:8080/TestService/services/TestService.TestServiceHttpSoap11Endpoint
When I run the code it is using old port value 8888 not 8080.
Because settings file was not updated with the new value 8080
Hope you understood the issue. I just have to update the settings whenever the config file gets changed. I tried with the below code in my class constructor as suggested by you. Still its not updating.
Properties.Settings.Default.Save();
Properties.Settings.Default.Reload();
|
|
|
|
|
BradNorthA wrote: Hope you understood the issue. I just have to update the settings whenever the config file gets changed. I tried with the below code in my class constructor as suggested by you. Still its not updating.
Properties.Settings.Default.Save();
Properties.Settings.Default.Reload();
That's how we do it in WinForms, and it saves the file locally. I just glanced at the documentation for ASP.NET, seems like they use a web.config; so I'm guessing that's something different.
Check if the settings-file that's in the Debug-folder is *not* readonly. Alternatively, store it in a XML file under your direct control (as opposed to relying on the generated stuff).
Bastard Programmer from Hell
|
|
|
|
|
Help Me Out . . . !
A distance calculator ... Or From Google How could I Add Service ....[Solution ....]
Jimmy
|
|
|
|
|
start Google Maps API[^]
Expecting people to provide... being too lazy to type... is unrealistic.
"You get that on the big jobs."
|
|
|
|
|
We are not here to ... Chris Maunder wrote: be surrogates for doing one's own research.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
|
how to display the list of tables in a mysql database, I have at my application module that requires selection of the database and selection of the table that will display its contents
|
|
|
|
|
You need to execute a query against the db.
Something like
SHOW [FULL] TABLES [{FROM | IN} db_name]
[LIKE 'pattern' | WHERE expr]
Go look at http://dev.mysql.com/doc/[^] to find the correct syntax for the version you are working on.
Maybe execute it as a stored proc and return it to your application.
|
|
|
|
|
You need to query the Information_Schema database, something like this:-
SELECT Table_Name FROM Information_Schema.Tables WHERE Table_Type = 'BASE TABLE' AND Table_Schema = 'yourSchema'
This will give you the names of all the tables in your schema.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
You don't need any SQL:
public override List<string> GetTableNames() {
using (OleDbConnection con=new OleDbConnection(connectionString)) {
con.Open();
DataTable dt=con.GetSchema("Tables");
List<string> tableNames=new List<string>();
foreach (DataRow row in dt.Rows) {
string tableName=(string)row["TABLE_NAME"];
tableNames.Add(tableName);
}
return tableNames;
}
}
|
|
|
|
|
thank you
|
|
|
|
|
I've never tried to access MySql with OleDb; I've always used the MySql .net connector.
On a MySql database I access at work that doesn't work -- it seems it may be an older version of MySql.
|
|
|
|
|
PMSL... or just
SHOW DATABASES;
oops... or indeed
SHOW TABLES;
edit... why did I think that said show tables the first time I edited, then edit it again to be incorrect to show databases... my excuse is that it was Wednesday...
modified 19-Apr-12 7:56am.
|
|
|
|
|
yes i chenged OLEDB with Mysql and it work
|
|
|
|
|
My mistake. That was a code snippet I once used on Access. I trust the same approach works just fine on MySQL, mutatis mutandis.
|
|
|
|
|
My problem was my mistake as well... the userID I was given only has access to views, so of course they didn't show up when I asked for tables.
|
|
|
|
|
can I use the same function to show the list of databases names?
|
|
|
|
|
Is there a way / workaround to send a HTML formatted EMail using SimpleMapi?
|
|
|
|
|
i am not able to extract human body from webcam image i am using aforge.net.please help me to find this problem.
|
|
|
|
|
The human body is an irregular shape with different colors. You can't simply 'detect something that looks like a body'.
Start with something simpeler, like a blue ball and work from there.
Bastard Programmer from Hell
|
|
|
|
|
Hi all,
I'm creating a specific DataGridView control that includes two scrollbars so that I can control their size and visibility. So, I have created a User control that contains the DataGridView and the two scrollbars inside a 2x2 TableLayoutPanel.
The issue I'm facing is that when I add my control to a Windows Form, I can't set my DataGridView's DataSource or define the column styles from the design view, because the link that I use for that when I use a common DataGridView (that little white arrow appearing on the top right side of the DataGridView) is not appearing.
While doing some testing, I saw that if I inherit my control from DataGridView, that link appears. But if I do that, I guess that I can only extend the functionality for the DataGridView, but I need my control to be a composite control.
So, that's my question: how can I get those design-time capabilities on my custom control? I am specially interested on the columns layout and the datasource.
Best regards.
|
|
|
|
|
I think the reason may be that the smart tag is at control level. When the DataGridView is used on its own, then it is a single control and the smart tag is available on it. Even in the designer surface of the user control, the smart tag may be available as different controls added to the user controls can be accessed separately.
But once the user control is compiled and is used as a control on a form, then the user control along with all nested controls will behave like a single control. Hence, if a smart is provided for the control as a whole then it may be available on the control.
With a similar analogy the properties of different controls comprising the user control can be accessed through the Properties window by clicking on a control in the designer surface of user control. Whereas, after compiling the user control and placing it on a form the properties of the user control only will be available in the Properties window and the properties of individual controls comprising user control cannot be accessed separately in the Properties window.
Hence, I think an option is to provide a smart tag for the user control. In this regard I think the following articles may be helpful.
Customizing User Controls with Smart Tag Feature[^]
How to make a Smart Tag using C#[^]
http://msdn.microsoft.com/en-us/library/ms171829.aspx[^]
|
|
|
|
|
Hi
I need to polulate XMLDatasource using a DataTable.
Can someone asisst please?
Regards
Chindiwo
Chindiwo
Programmer
-----
|
|
|
|