MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 7th, 2004, 02:24 PM
ibrahimasow ibrahimasow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 ibrahimasow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy 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>

Reply With Quote
  #2  
Old July 7th, 2004, 06:13 PM
Al_Dev's Avatar
Al_Dev Al_Dev is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 105 Al_Dev User rank is Private First Class (20 - 50 Reputation Level)Al_Dev User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 h 32 m 21 sec
Reputation Power: 6
Send a message via AIM to Al_Dev
you have to use cast function in T-sql to convert a value to double or convert().

good luck

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > OLE DB Provider for SQL Server error '80040e14'


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT