Upgraded from 4.? to get away from the Alter table failure. Now I can’t do a simple SELECT * on any table in my database…
Selecting distinct columns doesn’t work either.
Both attempts generate an System.InvalidCastException error…
Here is the full error message:
System.InvalidCastException
At least one element in the source array could not be cast down to the destination array type.
Stack Trace:
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.ArrayList.ToArray(Type type)
at Quest.Toad.Editor.Parsers.SqlParser.get_FilteredChunkTypes()
at Quest.Toad.Editor.Parsers.SqlParser.ContentForNavigator(ChunkTypes contentType, Int32 offset, Int32 size)
at Quest.Toad.Editor.Parsers.SqlParser.Parse(String text, Boolean checkSyntax)
at Quest.Toad.Editor.EditorForm.Parse(Boolean processParserMessages, Boolean syntaxCheck)
at Quest.Toad.Editor.EditorForm.DoExecuteSqlStatement()
at Quest.Toad.Editor.EditorForm.ExecuteSqlScript()
What’s going on? Surely this isn’t a problem for everyone?
Can you please let me know how your query looks like?
What you have in the editor at the moment of execution? I mean is there anything else besides the select statement?
What SQL Server version do you have?
Thanks,
Only thing in the query window is the select statement.
An example - using the Adventureworks database:
SELECT * FROM PERSON.ADDRESS
Just to make sure I've not gotten any of the selections for which database the query is to run against:
SELECT * FROM ADVENTUREWORKS.PERSON.ADDRESS
I get the same error no matter which database I choose.
System.InvalidCastException
At least one element in the source array could not be cast down to the destination array type.
Stack Trace:
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.ArrayList.ToArray(Type type)
at Quest.Toad.Editor.Parsers.SqlParser.get_FilteredChunkTypes()
at Quest.Toad.Editor.Parsers.SqlParser.ContentForNavigator(ChunkTypes contentType, Int32 offset, Int32 size)
at Quest.Toad.Editor.Parsers.SqlParser.Parse(String text, Boolean checkSyntax)
at Quest.Toad.Editor.EditorForm.Parse(Boolean processParserMessages, Boolean syntaxCheck)
at Quest.Toad.Editor.EditorForm.Parse(Boolean processParserMessages)
at Quest.Toad.Editor.EditorForm.Parse()
at Quest.Toad.Editor.EditorForm.DoExecuteSqlScript()
at Quest.Toad.Editor.EditorForm.ExecuteSqlScript()
If I use the "Verify SQL" button on the toolbar, I receive "executed successfully"
I just installed Toad, upgrading from v4.5 - should I try re-installing it?
I've attached a screen capture of the Toad session if that helps.
Can you please send to me one of your file from toad’s application data directory:
\Documents and Settings\Application Data\Quest Software\Toad for SQL Server 5.5\ModuleSettings[b]Editor.xml[/b]
Many thanks in advance!
Also can you please close toad, remane the file and run toad again - can you still see the issue?