Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odd error on first run 1

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

Got a bit of a weird error.

I have a Vb6 project which takes some data from an excel speadsheet, validates the data - then inserts it into our SQL db.

So....

I open the project and hit run. I get the following error:

Run Time error '-*INSERT LARGE NUMBER*' (*INSERT OTHER LARGE NUMBER*)
Selected collating sequence not supported by the operating system
[\quote]

On this line

Code:
Excel_SQL = "SELECT [Claim Ref], [Policy Number],[Claim Administrator],[Surname],[Forename], [Date of Claim], [Amount Paid], [Reserve], [Amount Incurred], [postcode], [Year of Account], [Date Closed], [Loss Description], [Peril Code], [Currency] FROM [Sheet1$]"
Set Excel_RecordSet = Excel_Connection.Execute(Excel_SQL)

But then you can just continue to run (dont jump this line) and all works ok.

Furthermore, if you then stop the project and run again, its fine.

Lastly if you close the project, and re-open.... then run. Error is back for the first run!!!

Any ideas?

Dan


----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
 
First off, your code has two lines in it. I assume that you're talking about the second, wherein you attempt to run the execute method. What I'm getting is that you have a default collating sequence set up that gets changed somehow while running your execute method. I would evaluate what collating sequence you have selected as a default and see what you can do from there.

I would say that this is more of an Excel VBA problem rather than a VB6 problem. You're liable to find someone who knows more about it in the Excel VBA forum.

HTH

Bob
 
Thanks StrongM.....

Well its another case of M$ saying "This happens!"

Well on the positive, it will only affect me when debugging!

STAR

Dan

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top