0
davedlg

Anyone experienced at using ArcView GIS??

Recommended Posts

Quote

I'm hoping someone on here has experience with writing ArcView scripts. I need to write a script that queries a table for id numbers that match id numbers located in a text file. Can anyone help?



Wow, talk about talking dirty;) That geek talk does it to me every time.
May your trails be crooked, winding, lonesome, dangerous, leading to the most amazing view. May your mountains rise into and above the clouds. - Edward Abbey

Share this post


Link to post
Share on other sites
Guest
There should be extensive online help available to you with any modern version of ArcGIS (ie 8 or 9).

Also, the ESRI web site hosts online courses that cover both the VB side and the database integration side of your problem.

If you are in fact using one of the later versions of ArcGIS with VB integrated into it, use VB to open the file and read the ID numbers until you hit end-of-file. If the ID number isn't by itself on the line you'll have to pick it out using a string function, how this is done depends completely on how the text file is organized. (Fixed length, delimited, etc).

Once you have the number from the file do a db lookup. Again, look to the help files and examples. I don't know how far the VB wrapper keeps you away from db specifics, it may be a little different whether you are hitting Oracle, SQL Server, or Access.

Depending on what you need to do with the id number ( ie just checking if it exists or manipulating something) to improve performance you'll be way ahead to buffer the input and read a 1000 (or whatever) id numbers form the file at a time and hit the DB with them at once instead of one-at-a-time.

My .02
Cheers

You can have it good, fast, or cheap: pick two.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

0