Help ASP Newbie Connect To Access Db Please
Nov 30, 2006
Hi
I'm new to ASP and I need to connect my webpages to an Access database I have created. I would do this in dreamweaver normally but I'm having trouble using the custom connection string function to do this. So I was hoping someone could explain how I would do this by coding it instead.
The code my web host provide to connect to a database is below. If someone could explain to me how I would use this to connect to a database, I would be very grateful. Thanks.
Quote: Dim oConn, sConnection
Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:sitesSingle??UserNamedatabasedata.md b;" & _
"Persist Security Info=False"
oConn.Open(sConnection)
oConn.Close
Set oConn = nothing
View Replies
ADVERTISEMENT
Aug 20, 2006
Hi All,
I am new to ASP, so bare with me. I am trying to connect to a database with ASP thats on an online server. I am recieving the following error:
Code:Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x1018 DBC 0x99aa314 Jet'. database/test.asp, line 15
Here is my file name "test.asp"
Code:<html><head><title>My First ASP Page</title></head><body bgcolor="white" text="black"><% 'Dimension variablesDim adoCon 'Holds the Database Connection ObjectDim rsGuestbook 'Holds the recordset for the records in the databaseDim strSQL 'Holds the SQL query to query the database 'Create an ADO connection objectSet adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connectionadoCon.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath( "/database/atosdba.mdb" ) & ";" 'Create an ADO recordset objectSet rsGuestbook = Server.CreateObject("ADODB.Recordset")'Initialise the strSQL variable with an SQL statement to query the databasestrSQL = "SELECT Elements_list.Sys_id, Elements_list.Element_Name FROM Elements_list; "'Open the recordset with the SQL query rsGuestbook.Open strSQL, adoCon'Loop through the recordsetDo While not rsGuestbook.EOF 'Write the HTML to display the current record in the recordset Response.Write ("<br>") Response.Write (rsGuestbook("Elements_list.Sys_id")) Response.Write ("<br>") Response.Write (rsGuestbook("Elements_list.Element_Name")) Response.Write ("<br>") 'Move to the next record in the recordset rsGuestbook.MoveNextLoop'Reset server objectsrsGuestbook.CloseSet rsGuestbook = NothingSet adoCon = Nothing%>
As i said, I am new and might be missing something simple.
Thanks for the help.
Bones
View 2 Replies
View Related
Apr 17, 2006
Hi there,
Thank you for this great site, and a special thanks to all persons here who are giving a big help to newbees as me.
here is my prob:
I have set up some few ASP pages using dreamweaver 8 in wich I put some forms to collect data from users (actually I'm recruting subjects for a scientific research) and teste them on my local host using IIS server and access 2000 database. all things work correctly. My strconnection in my local machin is as follow:
Code:<%' FileName="Connection_ado_conn_string.htm"' Type="ADO" ' DesigntimeType="ADO"' HTTP="true"' Catalog=""' Schema=""MM_connsujets_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:InetpubwwwrootSujetsRecdbRecruSujets .mdb; Persist Security Info=False"%>
I have found a site (http://www.asphost4free.com) wich host free asp pages. I uploaded my pages but the connection to the data base is no longer working. the host site give this sample of code to get to connect to the data base:
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
strConnection = "DRIVER=Microsoft Access Driver(*.mdb);DBQ=" & Server.MapPath("/USERNAME/db/yourdatabase.mdb")
oConn.Open(strConnection)
....
...
oConn.Close
I have follwed it and I have changed the username and the database name with mine but I can't figure out what to put to replace the .... after oConn.open. I git error this error when I have tryed to connect:
Microsoft VBScript runtime error '800a01a8'
Object required: 'oConn'
/kin2006/Connections/connsujets.asp, line 11
I deleted the oconn but it doesn't help I have tryed many other combination without any success.
Any clue!!
thanks in advance
View 2 Replies
View Related
Nov 15, 2013
I have a code which connects to sql server using DAO. I would like to know is that do my system require sql server native client installed to run this code? or what software needs to be installed to have this code works for me?
View 1 Replies
View Related
Feb 12, 2012
I had made MS Access application for a company.
After a while they asked me to connect that application with fiscal printer.
I don't know how to do that.
View 2 Replies
View Related
Dec 14, 2006
I have seen it done in the past but at the time my limited knowledge did not retain how to do it, it is connected through the odbc, im am running server 2000
what code do i use to connect and how do i set up the odbc
any help would be appreciated
Jabez
View 1 Replies
View Related
Jan 28, 2007
Hi,
I am finishing an Access database for a customer that may want, in a later stage, to have a website(probably ASP) that would connect on the same database. Is that possible? I mean can an Access project on a pc connect to remote database(mdb or SQL server) used by the website?
If so can you give me some quick steps to do so or a good article on it?
Thanks.
View 6 Replies
View Related
Mar 30, 2007
http://www.rainyjay.com/tapi/tapi.htm
we have a tapi enabled phone and i want to connect it to my pc and allow it to talk freely to my database..
eg.. a customer calls up.. if their phone number exists then display their details in access..
if it doesnt exist then open a new form which lets you add a customer.. etc
anyone had any experience in linking phones to access databases
View 1 Replies
View Related
Oct 11, 2014
Is there a way to connect access database with a softphone? I have an IP PBX and a soft phone and i need to click on a form and auto dial the contact. My DB contains all the data I need and also PBX.
PBX running asterisk software.
Do i need a module or something like TAPI that call windows dialer (but win dialer use a modem and not Ip phone I guess)..Or something that just wake up voip softphone and paste data?
View 2 Replies
View Related
Sep 28, 2013
I am just starting out learning how to connect Access to Excel. From an Access form, I need to connect to an Excel spreadsheet, and loop through every row/column to look for data that matches a database field data, then populates the associated cell data. I don't want to import the spreadsheet since the user who created it is using it manually, and I am attempting to automate the task. This is probably the most elementary code, but I would like to start out with the best way to do this. What I am finding is code that appears to be much more complicated than I need, for more complicated situations.
View 2 Replies
View Related
Dec 18, 2013
I 'm downloading the excel data from the site and connecting it to access.
In excel the particular column (Time Taken) is in the format of "00:12:26".
After connecting it to access and appending it to the table, the format changed to "12:12:26", the first two digits changed to "12" and the remaining are as it is how it looks like in the excel. I need to change it to format what it looks like in the excel.
View 7 Replies
View Related
Mar 21, 2007
Hi,
I'm designing a database for work and am using buttons instead of the navigation features already standard with access.
I need some form of code?? for my button. I want a user to be able to click this button when finished entering data; access will then save the data, close the form and return the user to a main menu, like a switchboard.
Any suggestions or indeed code, lol, would be very helpful
Regards
Chris D
View 3 Replies
View Related
Oct 11, 2005
Ok, I've been given a task to create a hierarchy diagram for my company, unfortunately the diagram has to be created using one excel spreadsheet. I would prefer it if the database could be created using the smallest amount of user input, so all he user has to do is import the spreadsheet to access and hit a button then the hierarchy is created.
I'm currently only going one step at a time, trying to sort the data from the spreadsheet using queries. But this is the problem:
Raw Data table
ID, Firstname, Lastname, Status, SupervisorFirstName, SupervisorLastName
Table1
ID1, Firstname1, Lastname1, Status1, SupervisorFirstName1, SupervisorLastName1
The idea is that the hierarchy diagram should start with the boss and move down to the mere siblings like me, and everyone will be connected. But for one reason or another this isn't the case, so at the moment I am trying to move the persons record if their supervisors name is not in the tree, so the SupervisorFirstName and SupervisorLastName are not in the Firstname and Lastname column.
I have been using the following SQL
INSERT INTO Table1 ( ID, LASTNAME1, FIRSTNAME1, Status1, SUPERVISORLASTNAME1, SUPERVISORFIRSTNAME1 )
SELECT ID, LASTNAME, FIRSTNAME, Status, SUPERVISORLASTNAME, SUPERVISORFIRSTNAME
FROM RawData
WHERE (((RawData.SUPERVISOR_FIRST_NAME)=FIRST_NAME) AND (RawData.SUPERVISOR_LAST_NAME)=LAST_NAME);
When I change the LastName to "SMITH" I know how many records I should get and it works, but how can I go through both columns finding any matches??
I may have described this quite badly so if you need any more info please let me know.
View 3 Replies
View Related
Jun 29, 2006
Hi all,
I'm just having a dabble in VBA for Access so I'm fairly newbish!
I have a field [Reference Number] that increments in the table by 1 everytime - but the user has to enter this manually (its not auto-incrementing). How can I do the following: when the user selects a new row in the table it will automatically look in the table for the last entered [Reference Number], increment it, and put that value in the Userforms TextBox??
Hope you understand this,
TIA
View 5 Replies
View Related
Jul 12, 2006
I hope this is the correct place for this type of question.
I have two tables, let's call one the "record table" that holds each record of interest. Let's call the other one the "rule table," as each entry is a "rule." The two fields of the rule table are rule and description.
I have a form with a list box and a text box. I'd like the user to be able to choose a rule from the list box and this would control the "rule" field in the current record. However, I'd like the text box to display the description corresponding to that rule, by looking it up in the rule table.
I know I've probably made it sound very complicated, but I assure you I'm trying to do something very simple here. Thanks for any help anyone can give me!
View 10 Replies
View Related
Oct 5, 2006
I am fairly new to Access, so please bear with my hopefully easy to answer questions. I am trying to create a database for a university where we input all of our student leaders information (name, email, student ID number, etc) along with the groups they are involved with so we can track and see who is involved with alot, and so we have easy access to their contact info if we need to do that. Anyway, I have already created a database to take in all the information and spit out the reports. It is probably pretty messily put together, but like i said, this is my first time working with Access on this scale.
My question is, when I created a report to display all the students involved with a specific activity, I ran into a bit of a problem. There are two students with the same last name, and for the activity in question, they both should be shown. However, it only shows one of their names (I have it set to show the last, first) but it shows both of their activity status. What am I missing to be able to split the names show its shows both names?
Here is a link to download the access file, and perhaps someone can tell me how to fix it.
http://us.f13.yahoofs.com/bc/440a2a54me2cd2c62/bc/access/Involvement+DB.mdb?bf8mTJFBardSN6ge
All of the sensitive information has been removed. It will still work without it though.
Thanks!
View 3 Replies
View Related
Apr 27, 2007
I am trying to learn first how do i lock a db so that it will keep users from tampering with the forms and queries, second i am trying to learn how can i transfer the form, queries, etc. to a new ms access database without having to recreate them all over again. I recieved updates from a source of mine and it contain new information, the old database is archived. And the new db with new information is keep separate from the old information in the new database so i had to recreate the form everytime.
View 1 Replies
View Related
Mar 23, 2006
I have a table (Master) that contains columns such as MsgLocation, MsgName, MsgScript, and MsgTxt. I want to create a form where the user would have an area to type in a 'string' and when they hit enter (or select a button), a (background) query would execute a lookup on master "where MsgTxt LIKE %string%"... For example, if a user wants a list of all MsgTxt values that contain "Please hold" they would type in a box "Please hold" and the query would use %Please hold% in the search criteria.
I don't have a clue on the first thing to do to get this done. And I'm new at this...
Thanks!!!!
Mary :)
View 9 Replies
View Related
Aug 24, 2004
I've been looking through the help for this.. but I can't figure it at all...
Simply... I've set a click method for command button on form to requery some fields. In effect it's a refresh.
What I would like to do it set the same command buttons gotfocus method to call the click sub.
Private Sub Refresh_Click()
On Error GoTo Err_Refresh_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Me!SelectMSN.Requery
Me!LesseeSubForm.Requery
Me!ReviewSubForm.Requery
Me!InsSubFormQuery.Requery
Me!SecuritySubForm.Requery
Me!AssetSubForm.Requery
Exit_Refresh_Click:
Exit Sub
Err_Refresh_Click:
MsgBox Err.Description
Resume Exit_Refresh_Click
End Sub
Private Sub Refresh_GotFocus()
Refresh_Click
End Sub
Reason being the gotfocus is called from another 'input' form and I want to data to be visible in main form after a save/close button i've created.
Thanks.
View 2 Replies
View Related
May 11, 2007
Hi to everyone firstly!
i am a firefighter, we have a set number of personnel on my watch, we work 3 days of duty, each day of duty each member of the duty crew are allocated tasks, not everyone can do all of the tasks!
the tasks are :-
one person drives the fire truck
one person drives the aerial ladder fire truck
one person fills the other crew position on the aerial truck
one person is the duty-man for the day
not all personnel can do everything, some don't drive, some can't drive the aerial truck but can be the other crew position
if we have more crew members than we need one or more may be sent out to another station
what i want to know is can a data base be set up, entering data to state who did what on each actual duty day and then the database will make a report to say which watch member is next to take a turn in each position?
there a some variables, some can't drive any fire truck, some can drive the fire truck but not the aerial truck and two personnel can't be on the aerial truck who can not drive it!
sorry if it doesn't make sense!!!!
i do have a vague outline knowledge of access, i can fill tables create forms and switchboards, do basic queries and reports
many thanks
Pete
View 6 Replies
View Related
Nov 2, 2006
Hello, i have a frontend DB linked to a backend DB wich contains tables, and i want to create 2 kinds of profile : those who can do everything (add,delete,update) and others that can only consult. Here is my question : is there an object to see if i am using the profile 1 or profile 2 and can i swap them using VBA code when i launch my program DB ?
Thanks in advance for help.
VINCENT
View 8 Replies
View Related
Dec 26, 2006
Hi everyone,
I have a very old Access Database (version 1) which I need to open however I only have Access 2003.
Do I need to buy an old copy of Access or can I download it anywhere ?
P.S - IT is not my strong point so I hope it's simple...
Many thanks
Pat
:confused:
View 2 Replies
View Related
Nov 1, 2005
Hello,
Hoping some one could assist me? I am busy designing a database which I am going to put in access.
I have designed the tables and am now not sure how to link them. I was given an excell spreadsheet with headings and am now trying to make this into a database. Example : I was given Co-ordinator Name - Which I now split up into:
Co_First_Name
Co-Last_Name
Co_Initials
Co_Area_Code
Co_Tel_Number
Co_Mobile
Co_Email
Now there other fields like this , for example Regional Manager Name - which I have split up as above into a seperate table.
These fields all relate back to one Code - Called District
There are also a fields which needs to show the a fee required the fee paid and fee outstanding/balance .
The rest of the information required I can create check boxes for , I hope!
Anyway my question is how do a relate all these different tables together?
This is my mental block. And the check box tha information - is it stored a another table? I hope I am explaining my self correctly and I hope some one can make sense of my question
View 4 Replies
View Related
Jul 14, 2006
Okay, I have two questions.
First, if I have a table, and I want to combine two records together, how would I accomplish this? For example, say I have the following table.
NAME SALES
Bill 2000
Jim 500
Ted 1000
And by some miracle of science, Bill and Jim are able to fuse together to become Jill, combining their sales together. So the new table would look ilke this.
NAME SALES
Jill 2500
Ted 1000
My second question is, say I have an extended list of the same table with 30 names and corresponding sales. However, I want to find out Ted's percentage of sales of the TOP 15, not all 30. How can I accomplish this?
Thanks so much in advance for helping out a complete newbie. :)
View 9 Replies
View Related
Aug 24, 2005
Hi all. I am fairly new to access and am trying to do something that shouldn't be that hard. I have a simple form with one text box and a command button on it. I have the command button set to run an update query.
My problem is that when I enter data and press the button, I don't know how to get the entered data into the query?
I know this is simple to do, but since I am new to access, I can't figure it out. Does anyone have a simple example or step by step details that they can share with me?
Thanks
Chris
View 2 Replies
View Related
Jun 10, 2005
Hi all, I am new to working with databases. My question is, how do you retrieve the autonumber ID of a field for a row just inserted into a database.
I have read numerous threads/articles, but none give me a clear picture of what the code actually looks like, just pieces(which is like greek to me). Could somebody tell me where I can see a working example of the code?
Thanks,
Mike
View 3 Replies
View Related