|
If you really need to, delete them by right click and delete.
I would prefer adding a tab and have all my controls in that.
|
|
|
|
|
Hello,
In my winapp targetting .Net FW v2.0.50727, a SQLConnection.Open() is done following FolderBrowserDialog.ShowDialog().
On the SQLConnection.Open(), I get the following error: "Error in the application"
stack trace
================
at System.Threading.TimerBase.AddTimerNative(Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.TimerBase.AddTimer(TimerCallback callback, Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.Timer.TimerSetup(TimerCallback callback, Object state, UInt32 dueTime, UInt32 period, StackCrawlMark& stackMark)
at System.Threading.Timer..ctor(TimerCallback callback, Object state, Int32 dueTime, Int32 period)
at System.Data.ProviderBase.DbConnectionPool.CreateCleanupTimer()
at System.Data.ProviderBase.DbConnectionPool.Startup()
at System.Data.ProviderBase.DbConnectionPoolGroup.GetConnectionPool(DbConnectionFactory connectionFactory)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPool(DbConnection owningObject, DbConnectionPoolGroup connectionPoolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at FolderBrowseAndSQLConnect.Form1.button2_Click(Object sender, EventArgs e) in E:\mybackup\FolderBrowseAndSQLConnect\FolderBrowseAndSQLConnect\Form1.cs:line 29
Please give suggestions to solve this problem. I run it on a "Win XP Professional SP3 Version 2002". Interestingly, this issue is not reproducible from other machines that have the same OS & .Net FW configuration.
Thanks
|
|
|
|
|
Can you post the code from Form1.button2_Click?
I are Troll
|
|
|
|
|
Sorry for the delay, here's the code:
private void button2_Click(object sender, EventArgs e)
{
try
{
string connStr = "";
if (string.IsNullOrEmpty(txtUser.Text) && string.IsNullOrEmpty(txtPswd.Text))
connStr = String.Format("Data Source={0};Integrated Security=SSPI",txtSQLServer.Text);
else
connStr = String.Format("Data Source={0};user id={1};password={2}", txtSQLServer.Text,txtUser.Text,txtPswd.Text);
SqlConnection sqlConn = new SqlConnection(connStr);
sqlConn.Open();
MessageBox.Show("succesfully queried databases");
sqlConn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
|
|
|
|
|
You're getting the Application Error on sqlConn.Open, and only on that specific machine? How does the connection-string look when you debug the application?I are Troll
|
|
|
|
|
Answer to Q#1.1: Yes the application error is on sqlConn.Open.
Answer to Q#1.2: Yes, this is reproducible only on some machines.
Answer to Q#2: connection string looks like this - "Data Source=computer-88\\sqlexpress;Integrated Security=SSPI"
|
|
|
|
|
Looks good, doesn't seem to be a problem with the code. It was on a specific machine? Could there be another application running that's using the same port as SQL Express?
You might want to try to connect over IP, using the default port-settings. If it helps, we'll have a clue where to look next I are Troll
|
|
|
|
|
Hi All,
I am inserting a toolStripSplitButton into the ToolStrip. And all the things are going fine.
At run time. when I select a Item from a DropDown items, the button part of the Split Button doesn't comes into the Pressed state.That is end user will not get to know that the item is selected.
I want the button part of the Split Button should work like a toggle button when a item is selected from DropDown or from the Button directly.
Let me known about the rendering if required, I do not know much about Rendering.
thanks
Rahul Kapoor.
|
|
|
|
|
|
Sir, let me know how can I set a read only property ?
Let me know something from the corner.
|
|
|
|
|
My bad, I mixed up the ToolStripSplitButton with a ToolStripButton. The property is indeed readonly, I didn't find any "nice" solution to display the button in a checked state.
It has been reported on Microsoft Connect[^] in 2005, but it doesn't mention what version of the Framework that this applies to.
There's no Checked property in the ToolStripSplitButton, nor in the ToolStripDropDownButton. That leaves only the option of extending the controls and building the desired functionality yourself, using owner-drawing.
I found a thread of someone who did that here[^].
I are Troll
|
|
|
|
|
i want to create a IM using c#.net win. app. + MSSQL
can anyone help me with this
here are some idea that may help u.
No log in at all
just type ur unique username and that it
this can be use in one workstation only
cos we are using one SQL server
pls help me with this thanks...
|
|
|
|
|
rockracker wrote: pls help me with this thanks...
1) analyse your requirements & document them
2) do some research and see whats out there that may assist
3) do a design, include logging, monitoring, test plans etc
(you may need to iterate through 2 & 3)
4) write some code to implement the design/missing pieces
5) test
6) when you have specific coding issues, post code, symptoms/diags etc back here
easy !
'g'
|
|
|
|
|
As Garth said; furthermore try using normal language, not txtspk, and when you later need to show some code please use PRE tags to achieve best readability.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Luc Pattyn wrote: and when you later need to show some code
Code, code you think he wants to create some code, don't be silly, he wants YOU to create the codz.Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How can i export data from datagridview into excell using vb dot net. i need simple code.
Help please
|
|
|
|
|
|
CheckOut This article.
You use the *.dll and all you have to do is:
MyGenericDataGridView gexp =
new MyGenericDataGricView("XLS",datagridview1, MyExcelExport.Theme.BlueSky,null,null);
|
|
|
|
|
Hi there,
I was wondering if it is possible to take a windows application and load the contents of the main window inside my c# application as either an MDI window or in a child control of some sort. At work we use some old software where each "module" is a seperate exe with its own window and I wanted to build a c# app with tabs or MDI windows or something to make it a bit more usable. We do not have access to the source code and its not managed code for sure. At first glance, it looks impossible, but I was hoping there was some sort of p/invoke or activeX magic out there. Thank you code project!
-- Steven
|
|
|
|
|
You can make it "look" as if an exe is running from your application using the SetParent API. To find out how, visit this CodeProject article
I are Troll
|
|
|
|
|
Thanks, that code did exactly what I needed it to. With a little customization, I got it so anytime an exe from our old software tries to run, it gets loaded in a tab on my program instead. Very cool!
Thank you so much!
-- Steven
|
|
|
|
|
My pleasure
I are Troll
|
|
|
|
|
|
Possible? Sure, but wise? That's another question... You are going to end up with a mish-mash of menu and tool bars (each app will have their own in their own window) and it is not going function like your typical MDI interface at all really.
|
|
|
|
|
private struct modelStruct
{
public string theModel;
public int theModelID;
}
private modelStruct thisModelStruct;
private ArrayList availableModels = new ArrayList();
I add some items to the arraylist. Then I want
cboModel.DataSource = availableModels;
cboModel.DisplayMember = "ModelID";
cboModel.ValueMember = "theModelID";
But I need to do some casting or content exctraction, but where and how? For DisplayMember the combobox shows "ToolHistory.History+modelStruct".
I have tried cboModel.DisplayMember = thisModelStruct.theModel; but it makes no difference.
|
|
|
|