Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual 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 Dev Shed Forums Sponsor:
  #1  
Old December 23rd, 2003, 10:37 AM
omenchaos omenchaos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 omenchaos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Access and Winsock

I have a good one to run by you all...

I have an program that uses an access database.
The database stores commands among various other bits of information.
Does anyone know of anyway to store a command and have VB process the returned variable as a command?

IE.

cmd returns
'SENDDATA "DISP VLR SUBS " & MOB & VBCRLF : PAUSE (1) : .SENDDATA "exit" & VBCRLF'
(or any other command within it).

cmd = rs(1)

With WinsockClient
cmd
End With

Does anyone know of a way to process this call to something like..

With WindsockClient
.SendData "disp vlr subs " & mob & vbcrlf
Pause (1)
.SendData "exit" & vbcrlf
End With

Is it even possible?

Last edited by omenchaos : December 23rd, 2003 at 01:20 PM.

Reply With Quote
  #2  
Old December 24th, 2003, 12:21 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
I have read your problem..But i am confunsed for u wanna send command to remote PC,and recieve this command at remote PC to return the result for sender??How can u use Database??

Reply With Quote
  #3  
Old December 24th, 2003, 11:14 PM
omenchaos omenchaos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 omenchaos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question re: Access and Winsock

The database stores commands for my visual basic program.. I have several tables IE command which has 3 columns
cmdID command descr

My visual basic program is reading from this database and executing the command through a winsock control.
I'm not sure how to store the command/s or how to extract the commands and pass them through winsock as a command, not as a string.

I can use SQL and get the command but it's stored as a string... somehoe I have to pass this as a command or make VB understand I'm wanting to perform commands with it..

Does this help any?
Thanks

Greg

Reply With Quote
  #4  
Old December 25th, 2003, 06:53 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Would U read from this database and executing the command through a winsock control??I think u can read the commands from DB by store it as string format,And recieve it as string format after sending it as string format.After recieve this command string,u can use shell or shellexcute to run this command as a string parameter.

Reply With Quote
  #5  
Old December 26th, 2003, 04:17 AM
omenchaos omenchaos is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 omenchaos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Access and Winsock

I dont think Shell would work. The connection to the DB is active; the connection to winsock is active.
See the database stores commands for Winsock to perform.
IE.
In the database commands like this would need to be executed.
1. WinsockClient.SendData "vlrmtc" & vbcrlf 'logs into table VLRMTC
2. Pause (.7) 'Pause to wait for switch
3. WinsockClient.Senddata "dis min " & txtmobile.text & vbcrlf
'Retrieves mobile number from text box and executes command to display VLR.

Is it possible to store commands like this in a database and then execute them?
Visual Basic would have to inturpert this as a command and not a string?

Reply With Quote
  #6  
Old December 26th, 2003, 09:08 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Maybe i didn't understand your meaning.
First:U will get the command string from DB.
second:send this command to reomte PC.
third:wait for switch..
last:recieve the command from remote PC and display it!!???

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Access and Winsock


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 4 hosted by Hostway
Stay green...Green IT