Forum Moderators: open

Message Too Old, No Replies

SQL database and web forms

Need to create web forms and access software database

         

katieray

3:48 am on Aug 10, 2005 (gmt 0)

10+ Year Member



I got a question, hope I'm in the right place. We have software that keeps our customers records, it is a small software company. The software is using a sql database. I need to create web forms and have it go straight into the database, can anyone give me a starting point on this?

Is it even possible to access the database, it is the software that is proprietary right? Not the database, so I should be able to access the database with the utilities just like an access database? Well not just like....I know....

Scally_Ally

10:29 am on Aug 10, 2005 (gmt 0)

10+ Year Member



because you have the database set up that is half of the problem done.. All you have to do is set up the html form with the relevant fields and then insert them into the database you have.

I havent used sql before but i would assume that it will be very similar to the MS Access method so here goes (using asp).

Have a page that recieves the variables eg. insert_into_db.asp, on this page get all your variables by the request.form("variable_name") method.
next open a connection to the database and run an sql query to insert these variables into it, like so.

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("your_database.mdb"))
sql = "INSERT INTO table (Value_1) VALUES ('Variable_1')"
conn.Execute sql
conn.close

then you can redirect back to any page.

Hope this helps, i know that it isnt for sql but maybe someone else can expand on this to incorporate it for your needs.

Ally

wingnut

11:59 am on Aug 10, 2005 (gmt 0)

10+ Year Member



Kinda depends on what sort sort of SQL database it is as to how you might manage the data. If it is a Microsoft SQL database you can connect to it using Access but ideally you need Enterprise manager which is part of the MS SQL server suite. Then the question of what scripting language you will use to script the web pages. This again will be dictated by the server the db resides on. Until those questions are answered it would be difficult to help you further.

mrMister

12:27 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't want to be using Enterprise Manager for web access.

You can connect to all mainstream databases using OLEDB. Take a look here for the connection string you need...

[connectionstrings.com...]

Here's a guide to SQL queries...

[w3schools.com...]

Here's a guide to connecting to a database with ASP and ADO...

[jansfreeware.com...]

aspdaddy

5:40 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you nned web acceess or just an easy way to create records locally?

If you need web access the SQL Server needs to be published, if this is an in-house system it probably isnt published so your first task might be to do that safetly i.e set up a DMZ or VPN.

Once the SQL can be connected to ,if you are not a programmer put some ready made ASP scripts on a Windows server and point the config file to the SQL server. Start with something like TableEditor from Aspin.com.

katieray

3:32 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



We're running the SQL Server, so we have Enterprise manager. My main concern was that I wouldn't be able to make these forms work correctly within the software, but if I have the software already set up then I can simply use their database, correct?

I was looking at the Enterprise manager last night and found most of how they have set up their database. So if I wanted people to fill out their demographics online before they come for a visit, and create a web page with a form on it I should be able to map those fields right into the database and it show up in the software the same as everyone else's, I hope....You guys are great, best place on the web!

I guess that PHP would be the best language to use on the web forms...I use Dreamweaver so maybe there is a way I can utilize that program to help in this little venture...

Did I say I love you guys!

aspdaddy

5:52 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just check that the software doesnt use some api or other layer of procdeures for transactions etc. Otherwise you may bypass some crucial validation.

I know some products does have this, Saleslogix for example has slapi.dll for ASP developers to integrate. If you bypass this & insert direct to the tables it screws up all the synchroniation.