|
This doesn't look right. Your connection string should look something like this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
Have a look at the following link to get more help with creating connection strings to Excel files:
http://www.connectionstrings.com/?carrier=excel
Paul
|
|
|
|
|
<connectionstrings>
<add name="ExcelConnectionString" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Contacts.xls;Extended Properties=Excel 8.0;HDR=Yes;IMEX=2"
="">
I changed it as it shows above. But the error is still there.
|
|
|
|
|
There still must be something wrong with your connection string.
Have you definitely got the syntax right?
Paul
|
|
|
|
|
What is this thing called DSN. Do I need to enter the excel spreadsheet in a DSN to make this thing work?
|
|
|
|
|
I cannot find the syntax error though.
|
|
|
|
|
|
No, that link is related to Visual Studio 6.0 SP4.
If you are not sure whether you can create a connection to an Excel file, try creating a Univeral Data Link (UDL) file. You can do this by creating a new text file on your desktop and then changing its extension to .udl. If you then double-click the file, you will be able to configure the connection. When you have finished configuring the connection, you can get the connection string by opening the .udl file in a text editor.
Paul
|
|
|
|
|
The title may not be right, but I don't know how to call it. I want to know how to make a class adapt to a particular of control at run time. I am building a rich textbox control similar to the one below.
http://www.codeproject.com/cs/miscctrl/richtextboxextended.asp
Everything works fine, but I don't want the control to adapt to the richtextbox at the time I am building it. I want the users to choose specific textbox when they drag the component to the form. In that case, when they drag the control to the form, only the toolbar portion will show, not the text area. From the toolbar property, they can choose the richtextbox to associate the component with. I want this type of functionality, in that case the richtextobx can be located anywhere in the form. It does not have to be located right below the toolbar.
|
|
|
|
|
I added a public value something like that
set { RichTextBox = value; }
From the control, I set the richtextbox visibility to false. I built it; it seemed to work fine. Now, when I dragged the control to the form, then dropped a richtextbox to test it. I can see a combo in the property where I can select that richtextbox name. However when I selected it, the program exited abruptly which seemed to be an exception to me.
|
|
|
|
|
I think you can debug the designer by opening up a second instance of VS and attaching the debugger to the instance you want to debug through Debug > Attach to Process, this should let you know more about the exception.
|
|
|
|
|
Hi all,
Well, i've got quite a trivial problem. In my case, the Form.Designer.cs file which should appear as if linked to the Form.cs file (as in 1 in the image) along wih the resx file in the solution explorer, has sort of broken the link (shown in 2 in the image). This means, the only file associated with the Form.cs is the Form.resx file, and the Form.Designer.cs stays out of it.
Here's how my solution explorer appears.
http://aravindaonline.atspace.com/sample.jpg
Consequently, the formatting of the Form are not visible in the development mode although it is seen during run time...
I just need to know how to link this back...;)
I'm sure this is way too easy for you all...
Thanx in advance!!!
A
|
|
|
|
|
I had the same problem before
and just add the Form.Designer.cs file to the project and it worked normally again (it seems you have the file too, because it works in the runtime as you said)
hope it's going to work for you too.
good luck
|
|
|
|
|
|
The only way I know of to do this is to edit the project file in a text editor (outside of Visual Studio).
You should see an entry in the project file like:
<Compile Include="Select_Scheme.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Select_Scheme.resx">
<DependentUpon>SplitButtonDemoForm.cs</DependentUpon>
</Compile>
<Compile Include="Select_Scheme.Designer.cs" /> You will need to change it to look like this:
<Compile Include="Select_Scheme.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Select_Scheme.resx">
<DependentUpon>SplitButtonDemoForm.cs</DependentUpon>
</Compile>
<Compile Include="Select_Scheme.Designer.cs">
<DependentUpon>SplitButtonDemoForm.cs</DependentUpon>
</Compile>
|
|
|
|
|
Hi,
I DownLoaded "TerminalControl" Project From This Site and I am Trying To Use This Project On Web Using WebClass Library. All Control are Displaying On Web except "Windows Custom Control Or Terminal Control" of This Project.
How To Solve This Problem Please Send a Reply....
Prabhu.R
|
|
|
|
|
Please help me.
I use Visual c# 2005.
I want to use some control with same name and diffrent index like control array.
Please tell me i can use what property of controls like DropDownList
Thanks in advance.
-- modified at 14:57 Monday 13th August, 2007
|
|
|
|
|
You can create an array of controls if you'd like. What are you trying to do exactly ?
Or do you mean the Items property on the data bound controls ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Visual Designer will not let you do this; it insists on having unique names
for controls. There are two ways to solve this:
- don't use VD for these controls, just create your controls programmatically,
so you can give them any valid name you choose, including array[index]-like names
provided you declare such an array of course.
- keep the controls as they are; now create a collection (array, ArrayList, List,
whatever) and add the controls to that list.
BTW: maybe you don't need anything new; you can iterate over all controls in
a container like this:
foreach(Control c in this.Controls) {
Button btn=c as Button;
if (btn!=null) btn.PerformClick();
}
The above would find all buttons and click them one by one.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
And you can also examine tag property of the control to identify exactly which one it is.
|
|
|
|
|
Anyone know any good tools that "don't get in the way". I mean a OR tool that simply creates an object at the DAL and leaves you with something easy to change/read/maintain...
I've tried a tool that put so much crap in my project that I can't begin to understand how to change it if I wanted too...
I've tried 2 tools that left me with awful code. It seems to me these tools are trying to do too much. Are there any tools that provide basic objects at the DAL or provide all layers and are easy to read, maintain ??
Thanks in advance..
|
|
|
|
|
I use Developer Express' XPO which doesn't really clutter things up much at all. Very easy to use once you get the hang of it. I've used it in both winforms and asp.net applications and have been happy so far.
Cheers,
Drew.
|
|
|
|
|
what is the programing code or AT command to send data from one modem to other. please note that I am not talking about SMS format . I want to send the data in the form of GPRS packet over the network.FOr code I am using C sharp as programing language.
thanks
|
|
|
|
|
There are 2 ways
Read about RAS connection
Or ConnectionManager.
what platform do you use
Compact Framework, Full Framework?
|
|
|
|
|
Plastio:
thanks very much for your prompt reply.Plastio I am just the beginer in the communication area. Will you pls tell me the difference of using these two utilities.RAS Connection OR Connection Manager
Secondly I am using Compact Framework of .NET.
thanks
|
|
|
|
|
I can lay down a lot of information since I have struggled with PDAs and Compact Framework a lot.....
But I will let you read and investigate yourself as a beginner
thats whats makes you a professional the ability to study fast and being accurate.
Please refer to the following link they are leading technologists in the field of
compact framework, I have collected a lot of material myself in the past from OpenNetCF
http://www.opennetcf.com/
Have a nice journey
(Read about ConnectionManager first and then widen your horizons towards the Tapi library)
Cheers
|
|
|
|