
July 7th, 2004, 02:24 PM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
OLE DB Provider for SQL Server error '80040e14'
I am getting an error when trying to execute the following statement in ms sql. It works fine in ms access. I get the following error:
--------------------------------
Microsoft OLE DB Provider for SQL Server error '80040e14'
'cdbl' is not a recognized function name.
------------------------------
Here is the sql that poses a problem.
Any help would be aprecitated, thx.
<code>
dim rsgetlocs : set rsgetlocs = objConn.execute("SELECT distinct ((69.1*(Latitude - " & rsZip("latitude")& "))*(69.1*(Latitude - " & rsZip("latitude") & "))+(69.1*( Longitude - " & rsZip("longitude") & ")*cos( " & rsZip("latitude") & "/57.3)*(69.1*(Longitude - " & rsZip("longitude") & ")*cos( " & rsZip("latitude") & "/57.3)))) as disc, ZIPCODES_TBL.* FROM ZIPCODES_TBL WHERE Latitude <= ("&rsZip("latitude")&" + ("&passedradius&" / ((6076 / 5280) * 60))) AND Latitude >= ("&rsZip("latitude")&" - ("&passedradius&" / ((6076 / 5280) * 60))) AND Longitude >= ("&rsZip("longitude")&" - ("&passedradius&" / (((cos(cdbl("&rsZip("latitude")&" * 3.141592653589 / 180)) * 6076) / 5280) * 60))) AND Longitude <= ("&rsZip("longitude")&" + ("&passedradius&" / (((cos(cdbl("&rsZip("latitude")&" * 3.141592653589 / 180)) * 6076) / 5280) * 60)))")
</code>
|