Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to view Access DB from VID

Status
Not open for further replies.

dcranford

MIS
May 18, 2000
131
US
Using the instructions given in the Database Basics of the VID Programmer's Guide, I am unable to view an Access database. The Data Connection procedure seems to fall apart when choosing a database. I cannot attach to the database by "browsing"; I must enter the UNC path. The properties of the Recordset and other DTC's appear to be fine (the correct fields and tables are available) but when I "View in Browser", the textbox; for example, is blank. Using the NavBar doesn't help either. Eventually, I get a message that says the RecordSet is not open even though the Test Connection always is successful. When I double click the table in the Data View window, I get an SQL2000 warning but press OK and the data appears (I don't even own SQL2000 or any of the 2000 series of software). I have installed SP4 for Visual Studio just in case but that didn't help either. I am using IIS 4.0, NT SP6a, and a WIN98 PC for developing. Any suggestions???

Deon Cranford
deon.cranford@scotlandhealth.org

 
Dear Deon,

I'm confused.

> I am using IIS 4.0, NT SP6a, and a WIN98 PC for developing

You have NT SP6a installed on a WIN98 PC?

Do you have two machines? An NT 4 Server and a WIN98 PC? If so do you have a DSN created for the Access file on the Server?

-pete
 
Sorry...there are two machines I'm working with. The NT server is running IIS with an established system DSN named SMHPhones. I am developing on a WIN98 PC. I've written a VB project using that DSN and all works well in VB. I'm trying to duplicate the same program in VID. I can connect to the IIS server when I initiate the DataConnection using the UNC path to locate the Access database. I've tried using the DSN option instead of "building" or "browsing" but the only DSN's available are the ones on my PC...the server's do not appear.

Deon Cranford
deon.cranford@scotlandhealth.org

 
> but the only DSN's available are the ones on my PC...the server's do not appear.

That does not matter, the code is executed on the server so the server DSN is what you want to use.

Hope this helps
-pete
 
Pete - I appreciate your time.

I choose New Web Project, then attach to the IIS server (SMHWEB) in Master Mode. Next I connect to the "existing web application" on the server (SMH Intranet Test)and click Finish. The project files are created on my C:drive under Visual Studio Projects which mimic the server's structure. I add an HTML page, then the Data Connection. Now it wants the name of a DSN. At this point I can only use DSN's that reside on my PC. I'm unable to use the SMHPhones which resides on the server apparently because the DSN's are part of ODBC.INI and are not true files. What step am I missing?

Deon Cranford
deon.cranford@scotlandhealth.org

 
Deon,

My apologies for not understanding you were using the 'Data Connection' objects. When the wizard prompts you with the list of drivers choose the correct MS Access driver then click 'Next'. Under the 'Connection' tab 'Select or Enter a database name' use the browse button to find your Access file. Test the connection. Does it work?

If so you are done. When the 'Connection Properties' dialog comes up just change the name to whatever you want but leave the 'Use connection string' radio button selected.

Hope this helps
-pete
 
The Test Connection works, I double-click the database in the Data View window and the table appears after some SQL2000 message. However when I "view in browser", the fields are still blank. I've tried grids, listboxes, etc...and all are blank. I just can't figure it out. Your last reply back to me makes me think there is another way to do this other than DataConnection. Care to elaborate. And I wonder if I installed VID on the IIS server and developed from there, the DSN/ODBC should be available? Seems unnecessary but I'm out of ideas.

Deon Cranford
deon.cranford@scotlandhealth.org

 
Deon,

I've had similar problems for the past two weeks. I've managed to install SP4 on Visual Studio and everything went away. Now I am able to post databases fine SQL and Access. My suggestion is look on your event viewer. It should give you some error (even the information once don't rule them out), Install SP6a in your NT IIS, make sure you have the correct Front Page Server Extention (2000 preferable).
Also look at the SQL Server event viewer as well. Most likely your problem is in SQL and possible security rights.

For the past two weeks I've been trying to post dbases in VID without results. No errors at all. I wrote a small ASP file and when I tried to execute it, got problems related to my IIS.

Hope this helps.


 
Deon,

xcell makes really great points! I would also add to his list the latest MDAC install. Get that installed on both machines.

-pete
 
Thanks to the both of you. I'll be getting back to it Monday. I'll advise then. Thanks for all the input.

Deon Cranford
deon.cranford@scotlandhealth.org

 
Reinstalled both SP6a on the IIS server and reinstalled MDAC 2.5 (just in case) on both machines. Just don't understand. How can the Test Connection work AND the Data View window work but not have any output when I "View In Browser"? Just a reminder that SQL isn't in the picture yet...simply tring to view an Access database.

Palbano - When you realized I was using DataConnection, you apologized. Is there another way?

Deon Cranford
deon.cranford@scotlandhealth.org

 
Deon,

I read your previous posts again. There is no mention of a DTC Recordset object. Do you have on on the page?

If so is it connected to the DTC Grid?
Have you set the Grid up? (added columns etc.)

Also you can use manual code to verify that the Recordset is producing data when you run the page:

Say you have a DTC Recordset named Recordset1 (default name), then at the bottom of your page do something like this:

// Not sure of the DTC.Recordset interface, you may need to
// look it up and correct this.
DBG EOF: <%=Recordset1.EOF%><br>
DBG: <%=Recordset1.fields(&quot;myfield&quot;).value%><br>


-pete

 
Deon,

You need to refresh the page a few times. Don't ask me why but when I don't, gives me nothing.

 
I appreciate both of you talking to me. xcell, the refresh made no difference either. I'll just go back to VB. Really wanted to try something new but this is taking way too much time just to make Chapter 3 work. I've got a medical project for the hosptial I've put aside because of this anyway. I'll get back to VID in a couple of months I guess. Thanks again...I've got your notes for later.
palbano, one more thing, I didn't understand your progrmming earlier:
DBG EOF: <%=Recordset1.EOF%><br>
DBG: <%=Recordset1.fields(&quot;myfield&quot;).value%><br>
Where was I supposed to do this???




Deon Cranford
deon.cranford@scotlandhealth.org

 
Deon,

> Where was I supposed to do this???

Anywhere on the page output you like. It provides a look into the 'state' of your server side code without having to debug/step%-( into the code. B-)

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top