Farooq Ahmed
|
| Posted: 05/09/2002, 10:50 PM |
|
I tried to connect two databases with following in ASP, but it does not work. Please explain in detail.
To create 1st connection set it up in Site/Properties/Database,
generate site and save Common.asp(php,pm etc.) under a different
name. Next change Site/Properties/Database settings to point to
another database. Now we have 2 common files , one is automatically
included into CC scripts (1st connection) , and in every script that needs
to connect to another database, the following should be done :
Select Page/"Custom includes" event , click "Obtain generated code",
and modify inclusion directives to include another coomon file.
E.g.
%>
<!-- #INCLUDE FILE="Common2.asp" -->
<!-- #INCLUDE FILE="header.asp" -->
<%
|
|
|
 |
Alex Alexapolsky
|
| Posted: 05/10/2002, 1:15 AM |
|
Still you can use 2 connection at the same page, which is what you're
probably doing.
|
|
|
 |
Farooq Ahmed
|
| Posted: 05/10/2002, 2:01 AM |
|
I tried my best but I could not connect two databases with above mentioned method. Note that I connect two databases in common files but in the page and form, it shows the first database and tables only. But when I run the programme, it give following problem. Please elobrate it in details. My programme is giving following problem:
Microsoft JET Database Engine error '80040e37'
The Microsoft Jet database engine cannot find the input table or query 'insti'. Make sure it exists and that its name is spelled correctly.
/testt/Common2.asp, line 34
|
|
|
 |
Farooq Ahmed
|
| Posted: 05/10/2002, 2:01 AM |
|
I tried my best but I could not connect two databases with above mentioned method. Please elobrate it in details. My programme is giving following problem:
Microsoft JET Database Engine error '80040e37'
The Microsoft Jet database engine cannot find the input table or query 'insti'. Make sure it exists and that its name is spelled correctly.
/testt/Common2.asp, line 34
|
|
|
 |
Alex Alexapolsky
|
| Posted: 05/10/2002, 5:29 AM |
|
Is "isti" a table from database from Common1.asp ?
|
|
|
 |
Farooq Ahmed
|
| Posted: 05/10/2002, 7:30 AM |
|
Yes, 'insti' is a table.
Actually first table (common.asp) is showing actual records. But when we give 'common2.asp' file in new page and give the required parameters, its code is ok in common.asp file (path of drive etc.) but it does not show the table no 2 in new form.
|
|
|
 |
Farooq Ahmed
|
| Posted: 05/10/2002, 9:11 PM |
|
I didn't get answer of my problem regarding connection of two databases.
Please reply asap, as it is urgent. I
|
|
|
 |
Nicole
|
| Posted: 05/13/2002, 4:32 AM |
|
Farooq,
please recheck connection settings for common2.asp file (probably path to db). The error is self-explanatory and you see that there's no such table in db.
|
|
|
 |
sho
|
| Posted: 05/13/2002, 5:09 AM |
|
Since at least one of your databases seem to be MS Access--have you tried to use links to the tables in the other database?
|
|
|
 |
Farooq Ahmed
|
| Posted: 05/14/2002, 9:11 PM |
|
Actually I am using two MS Access databases with names 1-'hmis' and 2-'emis'. Database 'hmis' contains table 'insti' while database 'emis' contains table 'cen2000'. First I connected 'hmis' with the project and saved it. Now I renamed 'common.asp' file as 'common2.asp'. Then I connected other second database 'emis' with the project and saved it. I made a page and it worked fine with 'Common.asp' file. Then I tried to made second page and in page menu, I connected as:
%>
<!-- #INCLUDE FILE="Common2.asp" -->
<%
but, when I tried to connect the table in the form, it shows the table of 'common.asp' file. If I try to connect with this table, it saves but when I run my programme, it gives the problem and says table is not present.
What should I do?
|
|
|
 |
|