Qbasic -> SQL

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:
Qbasic -> SQL

Post by SuperNova » Mon Jun 23, 2003 7:12 pm

Is there any way I can link a qbasic program directly to an SQL server on the internet?
I think not, but it's worth a try  ;)

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: Qbasic -> SQL

Post by jakykong » Thu Jun 26, 2003 3:33 pm

are you talking about to download? that's easy! all you have to do is save it in a zip document and link to it! if you are talking about running the program online, that's probably possible, however, yo will likely need to go somewhere like google and search for it, i'll go look now, and if i can find it at all i'll inform you.  :)
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

jakykong
Full Member
Posts:30
Joined:Wed Jun 25, 2003 1:05 pm

Re: Qbasic -> SQL

Post by jakykong » Thu Jun 26, 2003 3:38 pm

well, i did an advanced search(as always) on google and found the following site, if it is anything like you are looking for: http://jcprogs.50megs.com/cgi4qb.htm

this is a VisualBasic program you must install on your server that allows you to run .bas files as cgi scripts, if that will work for you, i am still on the hunt to find more things like it, but this was a first step!
I've not been a QBasic programmer since at least 2004. It was fun; I've moved on. Best of luck.

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Thu Jun 26, 2003 6:41 pm

Hey, that's great, thanks again for helping.
I am now discussing this (using CGI) with the person I'm making the program for.

I was looking for these functions:
-> Specifying a SQL db, a username and password to be used
-> Read from that db
-> Write to that db
But if the guy I'm making the program for agrees with CGI4QB, I'll do that.

Guest

Re: Qbasic -> SQL

Post by Guest » Thu Jun 26, 2003 10:15 pm

Hello.  I made the CGI4QB program, and I just wanted to jump in here.

Basically, if any of you guys use it, could you please e-mail the results you get?  Even if the results are just "Works fine."

Right now I have only had a couple testers for it, they have all reported no issues.

The biggest thing I need checked is how well it survives important tasks like being bombarded with requests, accessing large databases, etc.  

So far, it seems to work fine but, again, I don't have enough folks reporting.

My main setup I have tested it on is Win2000 running Apache 2 and QB 4.5 interpreter.  Also tested with 1.0 interpreter.

Please let me know what you get with it by e-mailing me at eighttruths@yahoo.com.

Thanks.

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Fri Jun 27, 2003 12:17 am

Perhaps you could add me to MSN or whatever way you want,
so you can help me linking my program to the Internet.  :)

Guest

Re: Qbasic -> SQL

Post by Guest » Fri Jun 27, 2003 12:59 am

I'm not much of an IM person.

Just e-mail me.

Installing the program is pretty simple as long as you have the VB 6 runtimes (I don't think I included them with CGI4QB).

Basically, you install the program in your CGI-BIN or SCRIPTS folder.  You also have to place the QBASIC interpreter in that folder (this is not included, but very easy to find).

The BAS files included with the download should be pretty self-explanatory if you have done both CGI and QBASIC before.

If not, just let me know, and I'll help.

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Fri Jun 27, 2003 2:58 am

thanks for explaining ;)
my bas program isn't finished yet,
but how should I make it?
I was planning on making a menu, like
1) Start
2) Load
3) Exit
but how will it be now?
just the 'engine' code?

Guest

Re: Qbasic -> SQL

Post by Guest » Fri Jun 27, 2003 4:34 am

You don't mean to run an entire QB prog in an HTML doc.  It's not possible.

I haven't tested this with SQL (I built my own databases when I need them) at all.

I'm not entirely clear on what you need here.  If you plan to just use menus on a webpage, that's a client-side Javascript job.

The BAS scripts have to run in one shot.  They execute; they terminate.  There is no ability to leave them running.  They do not stay resident (which is a good thing, because they would eventually overwhelm the server).

If you need users to do multiple tasks over a session, you're going to have to track all that with temporary files.

E-mail me with a few specifics, and I might be able to help you a little better.

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Sat Jun 28, 2003 11:49 pm

You are getting me totally wrong.
This is what I want

-> Run program on a harddisk
-> Store the results in variables
-> Connect with a database
-> Update database with variables
-> Disconnect
-> Close program

And please everyone,
do not suggest alternatives, do not ask why I want this.
I can get really irritated when people start suggesting alternatives or asking why I would want to do such a thing instead of trying to help me realising my plan.
If that plan can't be done I'll ask you for alternatives,
but do not suggest them before then, because you'll make me angry  >:( >:(

Guest

Re: Qbasic -> SQL

Post by Guest » Sun Jun 29, 2003 1:05 am

Y'know, I was horrified for a second there that you wanted a web-based system deploying QB right onto a page.  I've had a few people ask about that kind of thing.

I wish I knew SQL better than I do . . .  Most of my DB work has been on Linux with Thoroughbred BASIC . . .

So . . .  the server is remote, right?  

You need to run the QBASIC prog, save the variables to a file, then transmit the information from the file to the server.  Then, you're going to need to check if the task was complete and close the connection to the server.

Hmmmm . . .  It seems like that's going to just be outside QB's abilities.

Might it not be easier to try this with Visual BASIC?  

Although, this does give me something to work on.  

I will try to slap together something that send the info out.  If I get anything together, I'll post it here.  No guarantees . . .

Again, I wish I knew SQL better . . .  

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Sun Jun 29, 2003 1:57 am

CGI4QB is visual basic.
that just might do the job as well.
but, off course, feel free to research this,
and if you can help me in any way,
I'm glad you want to!  :D

Guest

Re: Qbasic -> SQL

Post by Guest » Sun Jun 29, 2003 6:01 am

CGI4QB was really meant to pass CGI requests into the server.  In other words, if SQL and CGI4QB are on the same server, there should be little difficulty getting them to work together.

Getting a remote server is a whole other issue.

Right now, I'm just thinking of a reverse flow.  Probably a VB CGI that can pass the info out to the remote server, by calling up a web page with the query.

Basically, you'd have a file output from QB and shell the VB prog to send the request.

I'm thinking this might be possible to make very generic, so that QB could just pass any CGI request out to the world.

If you have a good site with documentation on SQL, particularly how it reacts to outside requests to add info, that would be very helpful.

SuperNova
Jr. Member
Posts:17
Joined:Sun Jun 08, 2003 11:49 pm
Location:Netherlands
Contact:

Re: Qbasic -> SQL

Post by SuperNova » Mon Jun 30, 2003 1:07 am

I'll search for some, I'm not much of an SQL expert myself as well ;)
All I need is a program that reads from a file (which is made by the qbasic program) and uses the information to update the SQL server.
But we need to get a format for that file that qbasic can read & write and the SQL updating program can read.
With format I mean like will it be like this:

VALUE_A = CHEESE
VALUE_B = MILK

or like this:

Value_A = "Cheese"

etc.

And we'll probably also need a specific database tablename that the SQLupdating program can use.
Because if that's made variable, we'd need an interface,
but I need the program to run automaticly and do everything,
so all information should be entered with the Qbasic program and stored in the file.
If we make the tablename variable, it should be entered manually in the Qbasic program.
But if this isn't possible I would also be happy with just a program that has to be opened manually, and the datafile has to be picked manually, and the server things have to be entered manually.

I could try learing visual basic myself but I think I'm not ready for that yet.
Besides, I'd like to get the program finished within a year  ;)

Thank you all again for your help, I hope I will be able to show you a cool result some day  :)

Guest

Re: Qbasic -> SQL

Post by Guest » Mon Jun 30, 2003 10:18 am

So, it wouldn't be a big deal if we just sent the info out as a CGI request through VB's internet browser component?

It's not a pretty solution, but it will work.  Would probably require some babysitting . . .  Maybe not.  Could always tell the program to close when the browser navigation ends.

Post Reply