|
For those who may run into similar problem:
So I kept digging...er googling and finally came up with the correct search term... "illegal characters in app.config"
Solution: The replacement for the illegal character "&" is "& a m p ;" (remove the surrounding quotes and spaces! Ignore HTML and PRE did not work for display purposes).
This works fine.
Thanks to anyone who may have been trying to find an answer to my question.
-- modified at 11:46 Monday 21st August, 2006
|
|
|
|
|
Not come across that particular problem in a config file, but have had similar problem with inserting company names in an Excel worksheet header. Solution was to have two &'s e.g.
"Fetch && Co. LLC"
Steve
|
|
|
|
|
Hi All,
I have written a word Addin in VB and have added a sub-menu under "File" and some menu items under that. I have seen that the menu items added there sometimes appear at undesired places also ex: under AutoText-> Header/Footer menu in word. They also disappear after I delete Normal.Dot and restart the word session. This is not consistently reproducible.
Can anyone tell me what could be going wrong here?
Thanks and Regards,
Anil
|
|
|
|
|
I have developed addin in vb.net
My problem is about Context Menu.
When ever we right-click on the folder-tree-view code gives error that the "Explorer is closed and can not be used further"
what can be possible problem?
I think if i could some how detect the object on which right-click is done i can handle that..
or if i can detect the Pane .. eg. if i right click on Outlookbar then only the context menu appears that will too do..
well one more Q about Preview Pane is HOT TO ADD CONTEXT MENU TO PREVIEW PANE?
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
I am having trouble with my ColorDialog application settings, so that I may close the program, then open it back up to see it has retained its information. Previous help suggested I use the said My.Settings.FontColor, but it's throwing an error, saying that it's not part of Scribble.My.Mysettings. I suggested using strFontColor, but I was told that FontColor was the solution.
Private Sub btnFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFont.Click
'Declare the variables
cdgFont.Color = My.Settings.FontColor
'Show the Color Dialog
If cdgFont.ShowDialog = Windows.Forms.DialogResult.OK Then
'Set the FontColor property of the form
Index.txtFile.ForeColor = cdgFont.Color
My.Settings.FontColor = cdgFont.Color
End If
End Sub
|
|
|
|
|
It is difficult to help you without more info. Where is the error being thrown? How is the FontColor setting defined? (Application settings cannot be altered and persisted at runtime, so you need to make sure it is defined as a User setting).
|
|
|
|
|
Well, I thought I was explaining it the best I could, but I guess I could do better. Well, my startup form Index is the one that needs to be able to load the settings for cdgFont(the Color Dialog control), and The code I tried to use is here:
Private Sub Index_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Prefs.cdgFont.Color = My.Settings.FontColor
Prefs.cdgBackground.Color = My.Settings.Background
Prefs.UpdateCheckState()
End Sub
And that code is not loading it up like it should. Here is the code for my button(in the Prefs form) that is supposed to save the application settings. By the way, all my strings are set to User.
Private Sub btnFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFont.Click
'Declare the variables
cdgFont.Color = My.Settings.FontColor
'Show the Color Dialog
If cdgFont.ShowDialog = Windows.Forms.DialogResult.OK Then
'Set the FontColor property of the form
Index.txtFile.ForeColor = cdgFont.Color
My.Settings.FontColor = cdgFont.Color
End If
End Sub
My problem is that the program is NOT saving the information, so when I load up the Index form, the settings that should have been saved, are not, or maybe they are, and they do not load up, please help.
I'm new...
|
|
|
|
|
i try to have an SQL to show the data that is between today date and the specific date which is 2 months b4 the specific date. but i just cant get it write
sql = "select * from SoftContract where BETWEEN [ContractEnd]AND NOW "
i try many way like where [ContractEnd]-NOW =60 , contractend >=now AND now <60 but not really got the result i want
anyone can help?
|
|
|
|
|
If you are looking to return all records between [ContractEnd] and two months before, the WHERE clause should be something like:
WHERE [ContractEnd] BETWEEN DATEADD(MONTH, -2, [ContractEnd]) AND [ContractEnd]
Hope this helps.
|
|
|
|
|
there is error when i use that,
Run-time error
no value given for one or more required parameters
highlight---> Adodc1.Refresh
i wonder y dateadd?
Actually i want to show it in datagrid so there will be many data show if the value is there.
-- modified at 23:43 Sunday 20th August, 2006
|
|
|
|
|
What type of database are you executing this query against? Also, it would be helpful if you could better explain exactly what data you are trying to return and post the entire query you are currently executing.
|
|
|
|
|
i use microsoft access as the database .mdb
I have create a button to run that function to show the result in a data grid in VB
Here the coding::
Private Sub Image3_Click()
MsgBox ("Following are customer contract that going to expire in the next 2 months.")
sql = "select * from SoftContract WHERE [ContractEnd] BETWEEN DATEADD(MONTH, -2, [ContractEnd]) AND [ContractEnd]"
Adodc1.RecordSource = sql
Adodc1.Refresh
DataGrid1.Visible = True
Adodc1.Visible = True
showtotal
End Sub
|
|
|
|
|
The syntax is different in Access. Use "m" instead of MONTH.
---
b { font-weight: normal; }
|
|
|
|
|
i try it but thinks not that error cause if syntax error it will show the msg
|
|
|
|
|
No, there will not be a syntax error, as the syntax is valid.
It will think that MONTH is a parameter that you want to pass to the query, and as you don't pass any parameters to the query, the error message will be that it is missing parameters.
---
b { font-weight: normal; }
|
|
|
|
|
Ok, since you want to return the data where [ContractEnd] is between today's date and two months from today's date, the where clause would be:
WHERE [ContractEnd] BETWEEN NOW AND DATEADD("m", 2, NOW)
I am relying on guffa's post for the Access syntax here, as I haven't used Access in many years. This should return all the records from your table where the [ContractEnd] falls between today's date and two months from today's date.
Hope this helps.
-- modified at 8:08 Monday 21st August, 2006
|
|
|
|
|
yes i got it work.
is with the single quote '
thanks
WHERE [ContractEnd] BETWEEN NOW AND DATEADD('m', 2, NOW)
i was trying to enchance it to let user to search their own specific month but it not really working when i place a varible with it. Is it not allow to put variable inside? Example:
----
Public userin
userin = InputBox("Search data (Month)", "How many month do you want to check before the expire date?")
WHERE [ContractEnd] BETWEEN NOW AND DATEADD('m', userin, NOW)
|
|
|
|
|
Are you receiving an error, or is it just giving unexpected data?
|
|
|
|
|
recieve error
Run-time error
no value given for one or more required parameters
|
|
|
|
|
Ok, you will need to create the SQL Query string to incorporate the user's input. The way you are trying to do it is causing the Database to treat userin as a parameter.
Dim myQuery as String
myQuery = "SELECT yourFields FROM yourTables WHERE [ContractEnd] BETWEEN NOW AND DATEADD('m'," & userin & ",NOW)"
This simply concatenates the string to include the user input. Of course, it is likely better to create a parameter for the user's input in the query, then pass the user's input to it. I am not sure how you would do this in Access, as I have not used it in many years.
-- modified at 23:07 Monday 21st August, 2006
|
|
|
|
|
|
I am using visual studio .net 2002 i installed it in win-2000.
the software is running effectively in 2000.
.exe file which are made in vb.net are not running in XP why?
|
|
|
|
|
YOu haven't supplied enough information to solve the problem. Are there any error messages? What does this app do? What function of this app isn't working? Is there anything in the event logs that pertains to your app? Is the .NET Framework 1.0 installed on the XP machine?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I've no idea.
What do you mean by "not running in XP"?
|
|
|
|
|
the problem is "the software which is made in vb.net on win 2000 amd succesfully executed is not running on win-xp"
the errror shown as "the application is failed to initialize proprly"
|
|
|
|