|
Have you stoped in the middle of this and checked to see what High / low Latitude and Longitude you are sending in the SQL statement. Since you know what the Latitude and Longitude of the zip is (33182 Lat 25.7802 & Long -80.4182), and you know what the distance is, you should know what the high and lows should be (High lat 25.7946 and low lat 25.76571). Seems pretty simple... BTW... Miami has 134 records that come up if you check for zip codes at zip-codes.com.
|
|
|
|
|
I did stop and checked the high and low Latitude/Longitude and all 4 look fine, but I get the same result with a radius of 1 mile and a radius of 12 miles. I think the DB I'm using is wrong. Do you know where I can find another zip code DB?
Thanks again,
Martin
|
|
|
|
|
Hey all,
Just wondering how to go about accessing and reading data from a remote (on a webserver) xml file. Thanks
|
|
|
|
|
Look for information on how to create xml web services. An xml web service is just another class library (dll) that resides in a remote web server. All the methods declared in the xml web service return xml formatted data.
After you create a web service dll and place it in a remote web server, you can create windows app and when you right click on "References" on solution explorer, select "Add Web Reference" and just set the reference to the xml service you created (similar to setting reference to a dll in your hard drive).
After you set a reference to your xml web service, you should be able to create an instance of any class in your web service and you should be able to call any methods that have [WebService] defined in front of the method. Note that you probably want to call methods asynchronously due to slow response over internet, so look for information in it. VS automatically creates methods that can be called asynchronously and you just pass a callback function to let you know when it's done.
|
|
|
|
|
Thanks for the help. I'll be looking into it. Cheers
|
|
|
|
|
Hi there,
I have problems with DSOFile 2.0 from Microsoft.
I have downloaded the component from the Microsoft Homepage and tried the sample (VB 6.0).
When I tried to change the document title of a document containing a title, everything worked fine.
When I tried to "create" the document title, I get an "access denied". With the same file within explorer I can set the document title and afterwards I can change it through DSOFile.
Is there any known restriction that I have to create the title manually to use DSOFile?
tia
Sebastian
|
|
|
|
|
You DO know this is a sample project to demonstrate how to use the IPropertySetStorage and IPropertyStorage interfaces, don't you? It's NOT production quality code, NOT supported, and NOT guaranteed to do anything!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
yes I DO know that this is a sample, that it is not supported...
I think it should be ok to ask why a given sample does not work as expected because there are only a few methods so I dont have a chance to do something different...
I have not found any information on how to set the document title except this component and this is not working. Maybe I do something wrong but it would be nice if someone can tell me what to correct...
tia
Sebastian
|
|
|
|
|
I want to know that how to computer turn on Sleep and wake up mode using Visual Basic Program automatic.
|
|
|
|
|
I have two application. In the first one, I want to store values to the app.config file from my app textbox, how do I do in the app.config?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Server" value="" />
<add key="UserID" value="" />
<add key="Password" value="" />
</appSettings>
</configuration>
what should do in the value = "" ?
for example:
if the textbox1.text = "MyServerName", when the button click, then send the value auto sign to app.config value="MyServerName"...
After I install this app. in the target machine, install my second app. I need to read the three value from the app.config. Do I need to create another app.config for the second app or I can read from the same app.config? If I do can read from the same app.config, how should I code it in my second app?
Thanks All Your Help!
Lisa
|
|
|
|
|
|
how can I read tha app.config from other app. created? it created a menu.exe.config..how can I read it from another application?
Lisa
|
|
|
|
|
You cannot write a config file during runtim. You will want to serialize an object with your data to an XML file. You can do it like this:
1) Lets say you have an object called CustomSettings that has a bunch of properties that you want to save
2) You can set the appSettingsFullpath to something like:
appSettingsFullPath = String.Concat( _
Application.StartupPath, "\custom.settings.xml")
3) Then you can write your CustomSettings object out like this:
Dim writer As StreamWriter
' Write (serialize) XML app settings data
' Folder: <app executable="" bin="">
Try
writer = New StreamWriter(appSettingsFullPath)
Dim serializer As New XmlSerializer(GetType(CustomSettings))
serializer.Serialize(writer, Me.AppCustomSettings)
Catch ex As Exception
MessageBox.Show( _
String.Format("Cannot serialize XML settings object.{0}{0}{1}{0}{0}{2}" _
, Microsoft.VisualBasic.ControlChars.CrLf _
, ex.Message, ex.StackTrace) _
)
Finally
writer.Close()
End Try
4) You can de-serialize (read it) back into your object like this:
' Get (deserialize) XML app settings data
' Folder: <app executable="" bin="">
Try
Dim fileObj As File
If Not fileObj.Exists(appSettingsFullPath) Then
'** Decide what you need to do here
End If
fs = New FileStream(appSettingsFullPath, FileMode.Open)
Dim csSerializer As New XmlSerializer(GetType(CustomSettings))
'** you can add two event handlers below if you wish
' AddHandler csSerializer.UnknownNode, AddressOf csSerializer_UnknownNode
' AddHandler csSerializer.UnknownAttribute, AddressOf csSerializer_UnknownAttribute
Dim cs As SMS.CustomSettings
Me.AppCustomSettings = CType(csSerializer.Deserialize(fs), CustomSettings)
Catch ex As Exception
MessageBox.Show( _
String.Format("Cannot de-serialize XML settings object.{0}{0}{1}{0}{0}{2}" _
, Microsoft.VisualBasic.ControlChars.CrLf _
, ex.Message, ex.StackTrace) _
)
Finally
fs.Close()
End Try
I hope this helps!
Thanks,
-Len Miller
"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
|
|
|
|
|
Hello all,
I am making a vb.net application which is a product to be distributed in CD with moneyback guarantee. Since the CD will be offered with a money back guarantee, there needs to be some type of copy protection on the CD or the ability to only use the CD on one specific computer etc. Otherwise the customer can purchase the CD, make a full functioning copy and ask for their money refunded. If i provide a serial number, Customer can make a cd copy and use the serial number even after claiming for refund. Please provide any suggestions either for preventing to make duplicate CD or provide any mechanism which should be used to make application to be run on one system only.
Thanks,
Amod Mishra
|
|
|
|
|
Ahh! The Copy Protection pipe dream again.
Ever notice you don't see people, of sound mind and body anyway, selling software with a money back guarantee? Ever wonder why?
No matter what copy protection scheme you come up with, it will always come down to a single IF statement to determine wheather your code will run or not. This IF statement can ALWAYS be hacked to get around your protection.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote:
it will always come down to a single IF statement to determine wheather your code will run or not
This brings a question to mind... I have just built a trial version of a PocketPC App that only allows the user to input two entries. How should I go about it to make it harder for someone to decompile my application and change the code and get a full version for free?
Thanks,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|
|
Just Google for ".net obfuscator". You'll find a bunch of products that make it harder to figure out the decompiled code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Please help. I have a specific object which holds multiple collections of objects inside which I want to save/persist into the database. I am using VB6 and SQL Server 2000. Does anyone know how to do this? Thanks.
SDE
|
|
|
|
|
that can be done by data grid control... the sql server helps to create stored procedures to develop your database.
by
saravanaprabu.R
|
|
|
|
|
I have a datagrid with 3 columns and 3 textbox on the form. I want that when i resize the the columns in the datagrid, textboxes should also be resized along with them. I haven't found any columnresize event in the datagrid there's only resize event but it's for the datagrid itself. How can i find out which column is resized and accordingly resize the textboxes at the runtime.
|
|
|
|
|
You'r looking for the WidthChanged event of the DatGridColumnStyle class. You'll have to generate your own columns instead of relying on the autogenerated ones.
Check out the documentation here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have checked the documentation and i tried to create a new column
DataGrid2.DataSource = dataset
DataGrid2.TableStyles.Add(New DataGridTableStyle)
Dim a As DataGridTextBoxColumn = New DataGridTextBoxColumn
a.MappingName = "TableName"
a.HeaderText = "Customer ID"
a.Width = 50
DataGrid2.TableStyles(0).GridColumnStyles.Add(a)
but its not working. It is not placing the Customer ID on the header and it is also not resizing the column width. Is it the correct way or am I doing it wrong.
|
|
|
|
|
The MappingName should not be the name of the Table, but the name of the column in the table that that column is going to display.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I tried with both the column name and the table name but it's still not working.
|
|
|
|
|
i'm having a hard time figuring out where did i go wrong with this code.
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
'Begin Add operation -- Enable textboxes and
'disable buttons
EnableControls(True)
SetButtons(False)
'Add a new blank row to the dataset
Me.BindingContext(DsCourse1, "Course").AddNew()
'Set the focus to the first textbox
txtCourseID.Focus()
End Sub
is there something wrong with the syntax of the addnew method? coz it doesn't work
can somebody help me please thanks in advance guys!
|
|
|
|