SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 22nd, 2002, 09:50 AM
newtothis newtothis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 9 newtothis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to newtothis
Unhappy still cant get my database to run

Well.. I have gone to the sites that mrTed has suggested. And I have read ALL the material.

I have found what my problem is. I think I am using server-side codes on my page, because its an ASP (VBScript) and because I defined it as a dynamic page. I have all the database connections dont and I think I have the bindings correct.

The thing is I cant get the search tp give results when I test it. I do have a testign server that works. Just dont get any results.

I have realized from reading other source codes that my inputs are not hidden. What does that mean, and I am not too sure that I have the SQL to get the from the database and retuen the results.

Any suggestions? Is there any place I can see a sample sourse code for a database with a search box or table? I know if I get to see some sample codes (and Server Side) I can modify it to work on mine.

Need your help.

Newtothis

Reply With Quote
  #2  
Old July 22nd, 2002, 10:46 AM
mrTed's Avatar
mrTed mrTed is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: a northern town
Posts: 74 mrTed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 49 sec
Reputation Power: 7
Hi,

This will send a string to an asp page, search.asp...

<form name="find" method="post" action="search.asp">
<input type="text" name="searchtext" size="15">
<input type="submit" name="submit">
</form>

...then in search.asp, you can run your search query like this...

request_text = Request.Form("searchtext") 'This gets the value entered into the form and puts it into the var 'request_text'.

sqlStr = "SELECT [Field Name] FROM [Table Name] WHERE [Field Name] LIKE '%" & request_text & "%'" 'This builds the sql query. NOTE the use of the like CLAUSE to search for records similar to your search criteria. This is possibly why you get no results?

cnn.open "WHATEVER?" 'open the connection
rsSearch.open sqlStr, cnn 'do the query

'loop through if there are any results returned?
Do While Not rsSearch.EOF
response.write rsSearch("Field Name")
rsSearch.MoveNext
Loop

This is a bit vague, but I don't know what your database schema is like?. If you show us what you have so far, then we may be able to see what is causing the problems.

Can you connect to the database? Can you return and display any records?

(And please reply to this post with your further comments rather than posting a new topic.)

Regards, Ed.
__________________
/* measure twice, cut once */

Reply With Quote
  #3  
Old July 22nd, 2002, 08:43 PM
newtothis newtothis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 9 newtothis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to newtothis
Well.... mr Ted. I want to thank you for all your your help so far.

I plan to try everything you suggested. However, I have no idea what a schema is? Could you enlighten me please. That may be where all my problems lie.

There is so much to learn here, and I am willing to learn.

Thanks

Reply With Quote
  #4  
Old July 23rd, 2002, 05:42 AM
mrTed's Avatar
mrTed mrTed is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: a northern town
Posts: 74 mrTed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 49 sec
Reputation Power: 7
Hi,

Schema simply relates to the construction or layout of your database. Simply put, it is the composition of tables and fields within tables relating to datatypes and form which constitute your particular implementation.

I refer to it in my example because I don't know how your database is constructed, so I can only give a general example.

Just have a go as I suggested, read a few tutorials and you should get some stuff working pretty quickly.

Regards, Ed.

Reply With Quote
  #5  
Old July 25th, 2002, 10:01 AM
newtothis newtothis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 9 newtothis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to newtothis
not using a schema...still need help

mrTed,

Once again I thank you for your replies to my questions and queries.

Just to let you know, I am not using a schema as I am using Access to create the database. By the way I am designing this project using Dreamweaver MX. But here's what I want to do.

I have a table, named ClientInfo and in this table I have the following tables:-

IDnum(Primary key), Surname, Firstname, Dept, Address, State, CoursesTaken, Certifications, Experience, Comments, Email.

Now what want to do is allow people to search the database using the following fields:- CoursesTaken, Certifications, Dept, State. I want to allow the user to search the fileds using a drop down menu box. (Thats the search page)

Then I want to return results into a table with the Surname, Firstname (with the search fields as the heading to the table).

From this I want the user to be able to get a more detailed page of the individual records which will display:-
Firstname, Surname, CoursesTaken, Certifications, Experience, Comments and Email. (this I understand is done via a master/detailed page link using the Primary key (IDnum)

In addition to which if the user just presses "enter" to submit the form using the defaults, I want to be able to conduct a wildcard search to return all the records in the data.

It have tried writing this code using the bulit-in templates of Dreamweaver MX but I can not get anything, just nothing, and when I do get something, its a blank page or an error message.

I want to use VB or JSP, or even Javascript. Is there any suggestions on how to write this code by hand?

I know this is much, but I am really lost and just cant seem to get anything right. I know how to write web pages in html, but this database is killing me.

Appreciate the help so far

newtothis

Reply With Quote
  #6  
Old July 25th, 2002, 10:27 AM
mrTed's Avatar
mrTed mrTed is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: a northern town
Posts: 74 mrTed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 49 sec
Reputation Power: 7
Hi,

I think you need to start with the basic stuff and build on it to eventually do all you want. You will be better off(although a bit frustrated for a while...) doing this yourself and understanding what is happening rather than someone just writing it for you, although I don't mind helping you. Once you have done a few things in your list, you will be amazed how quickly it will all become clear!

Firstly, I would use my previous example and just edit it slightly for your database, so keep the search form intact but change the result page to...

request_text = Request.Form("searchtext")

sqlStr = "SELECT [Firstname], [Surname] FROM [ClientInfo] WHERE [CoursesTaken] LIKE '%" & request_text & "%'"

cnn.open "WHATEVER?"
rsSearch.open sqlStr, cnn, 2, 2

'loop through if there are any results returned?
Do While Not rsSearch.EOF
response.write rsSearch("Forename") & " " & rsSearch("Surname")
rsSearch.MoveNext
Loop

This will select the records from Clientinfo where the Coursestaken = whatever you put in the text box on the form. This should get you in the right direction. Once this works then try to figure out how to search on multiple fields and how to extract values from drop down lists.

Regards, Ed.

Reply With Quote
  #7  
Old July 25th, 2002, 10:59 AM
newtothis newtothis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 9 newtothis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to newtothis
will try that and see what works

mrTed

Thanks again.

I will try that and see what works.. then I will see if I can add some more complex searches.

Thanks

newtothis

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > still cant get my database to run


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