Click here to Skip to main content
15,914,222 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralOpen two tables in one form Pin
msnick25-Apr-05 14:53
msnick25-Apr-05 14:53 
GeneralRe: Open two tables in one form Pin
Mike the Red27-Apr-05 9:33
Mike the Red27-Apr-05 9:33 
GeneralRe: Open two tables in one form Pin
msnick28-Apr-05 15:32
msnick28-Apr-05 15:32 
GeneralHi!!!Want some help!!! Pin
shekkk25-Apr-05 12:41
shekkk25-Apr-05 12:41 
GeneralRe: Hi!!!Want some help!!! Pin
Len Miller25-Apr-05 15:32
Len Miller25-Apr-05 15:32 
GeneralCalculating the latidude and longitude of an area Pin
Martin@captivasystems25-Apr-05 10:16
Martin@captivasystems25-Apr-05 10:16 
GeneralRe: Calculating the latidude and longitude of an area Pin
msnick25-Apr-05 15:52
msnick25-Apr-05 15:52 
GeneralRe: Calculating the latidude and longitude of an area Pin
Martin@captivasystems26-Apr-05 3:55
Martin@captivasystems26-Apr-05 3:55 
Thank you for your reply. I tried your suggestion and I got the same result. I think that my zip code database is incorrect. Here is where I got the DB from : http://www.cfdynamics.com/zipbase/
If I try zip = 33182 and miles = 1 I get 71 zip codes. And if I try zip = 33182 and miles = 12 I also get 71 zip codes.
This is how I get the zip codes:

Private Sub getZip(ByVal LowLatitude As String, ByVal LowLongitude As String, ByVal HighLatitude As String, ByVal HighLongitude As String)
If (LowLongitude.Substring(3, 1) = ".") Then LowLongitude = "-0" + LowLongitude.Substring(1, LowLongitude.Length - 1)
If (HighLongitude.Substring(3, 1) = ".") Then HighLongitude = "-0" + HighLongitude.Substring(1, HighLongitude.Length - 1)

Dim sql = "Select ZIP FROM ZIP_CODES WHERE latitude > '+" + LowLatitude + "' and latitude < '+" + HighLatitude + "' and longitude < '" + LowLongitude + "' and longitude > '" + HighLongitude + "';"
Dim strConn As String
Dim strSQL As String
Dim Conn As OleDbConnection

Dim objDA As OleDbDataAdapter
Dim objDS As New DataSet()
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\PROJECT\zipbase.mdb"
Conn = New OleDbConnection(strConn)
Try
Conn.Open()
objDA = New OleDbDataAdapter(sql, Conn)
objDA.Fill(objDS, "ZIP_CODES")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Conn.Close()
ComboBox1.DisplayMember = "ZIP"
ComboBox1.ValueMember = "ZIP"
ComboBox1.DataSource = objDS.Tables("ZIP_CODES")
MsgBox(ComboBox1.Items.Count.ToString) ‘display the # of zip found

End Sub


THANKS AGAIN,
MARTIN
GeneralRe: Calculating the latidude and longitude of an area Pin
Martin@captivasystems26-Apr-05 11:52
Martin@captivasystems26-Apr-05 11:52 
GeneralRe: Calculating the latidude and longitude of an area Pin
msnick26-Apr-05 13:25
msnick26-Apr-05 13:25 
GeneralRe: Calculating the latidude and longitude of an area Pin
Martin@captivasystems27-Apr-05 3:14
Martin@captivasystems27-Apr-05 3:14 
Generalretrieving remote xml data Pin
Coreo25-Apr-05 6:30
Coreo25-Apr-05 6:30 
GeneralRe: retrieving remote xml data Pin
rudy.net26-Apr-05 18:42
rudy.net26-Apr-05 18:42 
GeneralRe: retrieving remote xml data Pin
Coreo27-Apr-05 14:36
Coreo27-Apr-05 14:36 
GeneralProblems with DSOFile 2.0 Pin
cad_guru25-Apr-05 6:00
cad_guru25-Apr-05 6:00 
GeneralRe: Problems with DSOFile 2.0 Pin
Dave Kreskowiak25-Apr-05 6:40
mveDave Kreskowiak25-Apr-05 6:40 
GeneralRe: Problems with DSOFile 2.0 Pin
cad_guru25-Apr-05 6:49
cad_guru25-Apr-05 6:49 
GeneralSleep and wake up Mode. Pin
Mkanchha25-Apr-05 5:00
Mkanchha25-Apr-05 5:00 
Generalapplication config Pin
Lisana25-Apr-05 4:27
Lisana25-Apr-05 4:27 
GeneralRe: application config Pin
Colin Angus Mackay25-Apr-05 6:29
Colin Angus Mackay25-Apr-05 6:29 
GeneralRe: application config Pin
Lisana25-Apr-05 7:59
Lisana25-Apr-05 7:59 
GeneralRe: application config Pin
Len Miller25-Apr-05 9:51
Len Miller25-Apr-05 9:51 
GeneralSecuring VB.NET applications Pin
Member 190968425-Apr-05 1:02
Member 190968425-Apr-05 1:02 
GeneralRe: Securing VB.NET applications Pin
Dave Kreskowiak25-Apr-05 4:48
mveDave Kreskowiak25-Apr-05 4:48 
GeneralRe: Securing VB.NET applications Pin
Mitch F.25-Apr-05 18:25
Mitch F.25-Apr-05 18:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.