Although this seems illogical, don't DIM your sAdverts variable as a dynamic
array. Do:
Dim sAds, sAdverts
instead of
Dim sAds, sAdverts()
Then all will be fine.
Ray at work
"Alan Silver" <alan-silver@nospam.thanx> wrote in message
news:JQm5xWCCBdWBFw$D@nospamthankyou.spam...[color=blue]
> Hello,
>
> I have been having problems with some blindingly simple ASP that fails. I
> have the following code ...
>
> Dim sAds, sAdverts()
> sAds = "1" & vbTab & "Ferret" & vbTab & "Furry" & vbCrLf
> sAds = sAds & "2" & vbTab & "Gibbon" & vbTab & "HAiry" & vbCrLf
> sAds = sAds & "3" & vbTab & "Vole" & vbTab & "Small" & vbCrLf
> sAdverts = Split(sAds,vbCrLf)
>
> Which gives a Type Mismatch error on the Split() line. I have done this
> sort of thing loads of times before and can't understand why this isn't
> working. The code above is a test version, designed to pinpoint the
> problem lines. The real code is supposed to get data from a database and
> convert the ADODB recordset to an array using GetRows(). When that failed,
> I cut the code down to the above.
>
> This is running on IIS6 on Windows 2003 Server. This is the first time I
> have done any ASP on this machine (only just installed it). ASP seems to
> be working fine as other stuff previously written goes without problems.
>
> Any idea why Split() doesn't work?
>
> TIA for any help.
>
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 100,000 Newsgroups - 19 Different Servers! =-----[/color]