|
Move all this SQL code to a stored procedure in the database and this shouldn't be a problem.
I hate the idea of setting a Locked field in the first place, but that's up to you. It not really a supportable solution and can get you in trouble if your code unexpectedly quits for some reason, since the Locked fields will never clear.
|
|
|
|
|
Thanks Dave
Will do, after all a Stored Procedure will will Execute the All these statements,
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi all
i am facing a problem called query is too complex.
what exactly i m doing is i have a richtextbox. i copy some text from doc file and paste it into richtextbox. then run a insert query that will insert the whole rtf to the database but this cause the error message query is too complex.
can some one tell me how to save the whole rich text of a richtextbox to a database, the field is memo.
thanks in advance.
help everyone
Falling down is not defeat...defeat is when u refuse to get up...
|
|
|
|
|
What does the query look like that's doing the INSERT??
What does the code look like that sets this up and executes the query??
What is the column type of the table that the RTF is going into??
|
|
|
|
|
Hi,
I am working on project and it's dealing with more than 100 textboxes and all of them has to be on single form. Does anyone know how can I add vertical scrollbar? I added control but it didn't seem to work, may be I didn't do something?! I would really appreciate it...
|
|
|
|
|
Hi,
this is the .NET approach, I don't know if it also works for MFC:
put a full-size Panel on the Form and set its AutoScroll true, then add
all the Controls to that Panel.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I can no longer access my main form in my project in designer mode. I now get the following error:
"Could not find type 'WindowsApplication1.CollapsiblePanel'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built."
CollapsiblePanel is a custom control that I have built. I have several of them on a form. I then get additional error statements saying:
"The variable 'ClpsPnlOutputOptions' is either undeclared or was never assigned." Here ClpsPnlOutputOptions is the name of one of the collpapsible panels on my form. I get errors for all these controls
Note I can run the project in designer mode but I cannot see the form in designer mode and accordingly cannot access any of my code that sits behind the code ( note I can see code in the Form1.Designer.Vb)
I am not sure why this is happening. I did some searching on-line and came up with a hotfix for VS 2005 Express:
https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=3981&wa=wsignin1.0
But this has not done anything for me. I really don't know what I have done.
Can someone please provide advice on this error as I am stalled dead in my tracks.
Thanks
EM
|
|
|
|
|
ExcelMonkey wrote: Could not find type 'WindowsApplication1.CollapsiblePanel'
Is this class part of the same project, or is it a different project in the same solution, or is it a seperate project (not in this solution) that you're setting a reference to??
ExcelMonkey wrote: The variable 'ClpsPnlOutputOptions' is either undeclared or was never assigned
Or it's possible that this project has a coding error in it that makes the control fail. Since when you drop a control on a form at design time you're actually running the code in the control, this message is a definite possibility.
|
|
|
|
|
Its a class in the same project. I have 1 project with multiple forms, three class modules, 1 regular module.
I am trying to think back to what I may have done. It was working fine the last time I was using it. Now, I cannot even see my form or my code. At some point I added an event to the CollapsiblePanel Class and then an event handler in my main sub to restrict the number of CollapsiblePanles open at any one time. Then I renamed all my CollapsiblePanels. However, everything was working fine after I did this so I am not sure this is it.
I was also wondering if someone may have hit the keyboard while my code was open and entered a few keystrokes in the class module (i.e. my little boy - 20 months old). This is not farfetched but unlikely.
Is there any type of audit I can do to get more information? I could reveiw the Class module as I think its still visible. Its just the main form that is hidden (i.e this form has the collapsible panels on it).
As noted, the hotfix didn't do a thing.
I am literally stuck and cannot move on as all my code sits behind this form.
Thanks
EM
|
|
|
|
|
And everything compiles with no errors or warnings?
As a "work around" (backup your entire project folder FIRST!), I'd get into the designer generated code of the form and remove all traces of your control being instantiated. Yo ushould then be able to go back to the designer and see the form again. Drop a single instance of your control back onto the form, with the same name it had previously as see what happens. If the designer doesn't crash, you'll probably be in good shape to add the remaining instances, again, naming the same as they were before.
If it does crash, then you've got a problem in your control somewhere, either in it constructor (New), or in some code that does painting or some other event.
Sometimes Visual Studio looses it's mind and a control that used to work no longer does because the designer generated code gets all hosed up. I've found that removing the instances of the "offending" control and readding them usually fixes the problem.
|
|
|
|
|
So yes it run. But I do get Warnings/Errors. The first speaks to the assembly and reference. I then get Type errors saying that variables were not declared in the form code - when in fact they were.
"remove all traces of your control being instantiated"
What do you mean by this? I can get into the form generated code but I am not sure what I am looking for or what to do. Do you mean delete all the code in the form generated code?
"Drop a single instance of your control back onto the form, with the same name it had previously as see what happens. "
My panels have a lot of other controls in them. So I am basically removign everything - correct? I have had this problem before and simply rebuilt. What's to say that this will not keep happening?
"If it does crash, then you've got a problem in your control somewhere, either in it constructor (New), or in some code that does painting or some other event"
Where would the problem be in the constructor (NEW)? I believe my type errors refer to these (i.e. variable not declared).
Regards
EM
|
|
|
|
|
ExcelMonkey wrote: What do you mean by this? I can get into the form generated code but I am not sure what I am looking for or what to do. Do you mean delete all the code in the form generated code?
Not all of it. That would be pretty distasterous.
Look through the code an it'll be pretty clear what's going on. At the bottom, there's a bunch of lines that start with Friend WithEvents . These declare the variables that will hold the instances of your controls. You'll also notice that they have the names that you give the controls in the Name property you see in the Properties box.
Just find and remove the lines that correspond to your control instances, something like
Friend WithEvents CollapsibleControl1 As something.CollapsibleControl
Then scroll up the code and you should see a section divided by comments for each control on the form. Find the sections that correspond to each on your control instances. They'll all start with a small comment section showing the name instance of the control. Just delete the comments and the code directly below it, until you reach the next set of comments.
'
'CollapsibleControl1
'
Me.CollapsibleControl1.someProperty = someValue
Me.CollapsibleControl1.someProperty = someValue
Me.CollapsibleControl1.someProperty = someValue
'
'Form1
'
....
You'll see squiggly red lines under all of these lines of code (except the comments of course). That should make those lines stand out to you.
Lastly, scroll up some more and you'll see the code that creates the instances of the controls. Each line will look something like:
Me.CollapsibleControl1 = New something.CollapsibleControl
Me.CollapsibleControl2 = New ...
These should also have squiggley red lines under them. Delete these lines too and save the project. You should then be able to go back to the form designer, close, then reopen the form giving you the problems.
|
|
|
|
|
One last question. My form has 5 Collapsible Panels on it. Each Panel is loaded with additional controls. Does deleting the code - as mentioned above - actually remove the existing Collpasible Panels from the form. That is, if upon doing so, and I can call up my form, will the 5 panels no longer be there?
The reason I ask is that removing the panels will remove every other control as well. There is an abunance of code (i.e. my main sub) behind one of the controls and also the code generated by the form will have an abundance of code sitting it as well (i.e. code associated with all the other controls which were in the collapsilbe panels). So if these other controls are removed when I remove the collapsible panels, then doesn't this mean that the current code which is generated by the form will continue to fail as the controls that support this code are now missing too?
I will give this a look at tonight. My concern here is that I have delete my entire form (i.e. controls/code), rebuild, and fear it happening again at a later date.
Thanks
EM
|
|
|
|
|
ExcelMonkey wrote: Each Panel is loaded with additional controls. Does deleting the code - as mentioned above - actually remove the existing Collpasible Panels from the form.
Yes.
ExcelMonkey wrote: The reason I ask is that removing the panels will remove every other control as well.
It won't remove the controls, but you'll have to comment out the lines that add those controls to the Controls colection of your panels, or just replace your controls with the standard Panel control.
ExcelMonkey wrote: when I remove the collapsible panels, then doesn't this mean that the current code which is generated by the form will continue to fail
Yes, but you're not going to recompile the project after removing the controls. You have to put your controls back on the form after they've been removed. This will regenerate the designer generated code for your controls.
You're just removing the designer generated code, not the code handling all the events on the form.
|
|
|
|
|
Hello,
How would you make a form invisible/opacity 1% while keeping a label within the form completely visible?
Thank you!
|
|
|
|
|
You can't. It's the entire form, including all of it's controls, or nothing.
You MIGHT get away with having a duplicate form layout on another borderless form, which has a transparency key setup and is the size of your existing forms client area, and put a label on that form, then place it over the top of your existing form. I don't know if it would work, but it's worth a try.
|
|
|
|
|
hi all,
i execute a simple query which update two fields of table.one field is id and second field is MEMO type. in memo field i store data of rtf file but "Query is too complex" error occured. I use MSAccess database .
Please guide me
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Without seeing the code that threw the error, it's impossible to tell you anything useful.
|
|
|
|
|
I have created one vb.net application, which runs my crystal reports perfectly fine.
And I have created installation of my application.
now when i install this application on my system or other system....my crystal report gets error.
that means my crystal report not getting path where actual report is stored...
I think i have a problem while deploying application or i have to do something on my code so that i can get path of my crystal report.
please anyone can help me on this problem....
Som !
|
|
|
|
|
It would be wise to show us the exact error message you're getting.
If it's a path problem, try building and specifying the complete path to the report file and not just assume that the report is in the "current directory".
|
|
|
|
|
I have an records near about 2.5 lac but excel sheet(sheet1) can contain maximum of 65 thousand now how can I transfer the records to the excel sheet . my application gets hang.
|
|
|
|
|
Excel simply isn't going to handle this. Excel's limit cannot be changed. The only way you'll get more rows is to add more sheets. But, even if you do this, I doubt you'll get 2.5 million rows into Excel, no matter how many sheets you use.
It sounds like you're trying to treat Excel as a database, something which it's not designed to do.
|
|
|
|
|
I wonder if anyone can help me. I am using VB.Net 2003
I have a grid that I want to format values in that grid e.g. format to 2 DP or righjt align etc
I tried the following and it does not seem to work.
dr(1) = format(objDR("VGFLOR"), "#0.00")
When I display in the command window it looks fine but displayed it is still the same e.g. 12.3 but I want 12.30 to be displayed.
This is a sample of how I am setting up my grid. There is code missed out.
'setup the grid columns
dt.Columns.Add(New DataColumn("Name", GetType(String)))
dt.Columns.Add(New DataColumn("Department", GetType(String)))
dt.Columns.Add(New DataColumn("Salary", GetType(Double)))
Do Until objDR.Read = False
dr = dt.NewRow
dr(0) = objDR("NAME") 'Name
dr(1) = objDR("DEPT") 'Department
dr(2) = objDR("SALARY") 'Salary
|
|
|
|
|
You don't format the values in the DataTable. You format them when displayed in your DataGridView, or whatever else you're using to show the data. In the DGV, you'd supply formatting information in your column definitions.
Dim col As New DataGridViewTextBoxColumn
With col
.HeaderText = "Header..."
.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
.DefaultCellStyle.Format = "#0.00"
End col
Dgv1.Columns.Add(col)
|
|
|
|
|
I have a treeview and each node has an icon. At runtime, the icons are appearing with a blue border which makes result very ugly. I use the same imagelist for a listview on the same form and the icons are being rendered perfectly without the blue boarder. Is there something in the system settings or whatever settings that i need to change or be aware of to get rid of this problem? The Icon size is 16X16 (same for the original icon, imagelist setting and treeview icon size) and the color depth is 32bit (highest for my machine)
Thanks for assisting.
|
|
|
|