Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

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 ASP Free Forums Sponsor:
  #1  
Old October 1st, 2004, 01:55 AM
Jasdeep Jasdeep is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 4 Jasdeep User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Inputting data through VB

Hi,
I need to know how I can use VB to input data into any software. I am currently working on a project which involves feeding data into CPLEX, which is a linear program solver. I am extremely new to VB and I don't know anything about it. I have to do the linking of VB and CPLEX myself. Can anybody give me some tips on how to proceed and some good book that I can refer?

Regards,
Jasdeep Saran

Reply With Quote
  #2  
Old October 5th, 2004, 09:08 AM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 4
Some years ago I was working with G2 (the simulation language, the pure object language, a shame $$$$$), I am not sure but, I think we send data to CPLEX writing data to a text file and running and feeding CPLEX with the specific file. VB is OK for doing it, but you should seek documentation about how to send data to it, and to retrive the results, if this version suport DDE or something else.

Beware with CPLEX set the maximum lenght of the search tree or you can spend days before finish it.

If you told us how are you specting to feed CPLEX the info, may help to be more specific with the help.

About VB almost any book could help and use http://msdn.microsoft.com/library/d...l/vb6anchor.asp (an excellent resource), and learn from the code that many programers share.

I hope this help.

Reply With Quote
  #3  
Old October 5th, 2004, 06:36 PM
blaze_r20 blaze_r20 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: md
Posts: 24 blaze_r20 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 33 m 10 sec
Reputation Power: 0
Send a message via Yahoo to blaze_r20
essentually

have Vb put the info into another file, then have the other program take the data from the file.
if you know how to do this skip the next section, otherwise:

use NOTEPAD.EXE to create a file that you wish to use, or a 'template'
basicly have a line for each piece of data that you wish to use and plug a empty integer into the line

this is what you would have the document read:

0
0
0
0

go to save as, where it says '.txt' select 'all file types' and where you type the filename, put a '.' whatever behind it,

ex:

test.tst

go into Vb, go into the coding, this is the coding you would use to write the data to the file

open "test.tst" for output as #1
print #1, (data goes here)
print #1, (data goes here)
print #1, (data goes here)
print #1, (data goes here)
close #1

if your going to use test.tst as a template type file then use the following coding:

name "test.tst" as "(werever you want to put the file)"
Vb will COPY the file and rename it, and when it runs back through writing the data, it will overwrite the old data, assuming it has the same amount of digits.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Inputting data through VB


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 6 hosted by Hostway