Unable to connect to Nav 3.7 native DB using CODBC in ASP

techie
Member Posts: 2
ASP connect to MBS Navision MY3.70
I am trying to use CODBC to connect to MBS Navision MY3.70 native database using Microsoft Interdev 6.0 (Active Server Pages (ASP). I already created DSN in the ODBC Manager.
The below is the code:
SQL="Select * from Customer"
Set conn=server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={C/ODBC 32 bit};Data source=NavASP;Database=E:\program Files\MBS Navision MY3.70\Client\database.fdb;PPATH=E:\program Files\MBS Navision MY3.70\Client;UID=sisb;PWD=;CN=CRONUS Malaysia Sdn. Bhd.;"
Set RS = server.CreateObject("ADODB.RecordSet")
RS.Open SQL, conn
When I run the program , the following error is return:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft Business Solutions ApS][Microsoft Business Solutions-Navision ODBC Driver]ISAM error
Any solution(s) for the above problem?
I am trying to use CODBC to connect to MBS Navision MY3.70 native database using Microsoft Interdev 6.0 (Active Server Pages (ASP). I already created DSN in the ODBC Manager.
The below is the code:
SQL="Select * from Customer"
Set conn=server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={C/ODBC 32 bit};Data source=NavASP;Database=E:\program Files\MBS Navision MY3.70\Client\database.fdb;PPATH=E:\program Files\MBS Navision MY3.70\Client;UID=sisb;PWD=;CN=CRONUS Malaysia Sdn. Bhd.;"
Set RS = server.CreateObject("ADODB.RecordSet")
RS.Open SQL, conn
When I run the program , the following error is return:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft Business Solutions ApS][Microsoft Business Solutions-Navision ODBC Driver]ISAM error
Any solution(s) for the above problem?
0
Comments
-
Hi Techie,
First of all make sure you have defined the DSN correctly on the computer running IIS. It should be an System DSN rather then a User DSN. Write down the name you use for this DSN entry, for example Navision. Also check out the Options settings regarding the conversion of identifiers. I prefer to select the a-z,A-Z,0-9 option where every space or dot is replaced with an underscor in fieldnames.
Next put the following code in your ASP page
<%
myDSN="DSN=Navision"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
mySQL = "SELECT * from item"
response.write mySQL & "<br><br>"
set rstemp=conntemp.execute(mySQL)
If rstemp.eof then
response.write "No data found!<br>"
else
response.write "<table border=""1"" style=""font-family: Verdana; font-size: 10pt"">"
response.write "<tr><td width=""20%""><p align=""right"">" & "<B>Inventory</B>" & "</td>"
response.write "<td width=""20%""><p align=""right"">" & "<B>Sales_ (Qty_)</B>" & "</td>"
response.write "<td width=""20%""><p align=""right"">" & "<B>No_</B>" & "</td>"
response.write "<td width=""40%"">" & "<B>Description</B>" & "</td></tr>"
response.write "<font face=""Verdana"" size=""2"">"
do until rstemp.eof
response.write "<tr><td width=""20%""><p align=""right"">" & rstemp("Inventory") & "</td>"
response.write "<td width=""20%""><p align=""right"">" & rstemp("Sales_(Qty_)") & "</td>"
response.write "<td width=""20%""><p align=""right"">" & rstemp("No_") & "</td>"
response.write "<td width=""40%"">" & rstemp("Description") & "</td></tr>"
response.write "</font>"
rstemp.movenext
loop
end if
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
%>0 -
My "system DSN" seems to work (I can select a company), when I launch my ASP page, nothing happens during 5 seconds then a nice error message slave.exe ... send error to microsoft appears. ](*,)
I shrink the code and it's hanging at the "conntemp.open myDSN ".
What next? other possibilities to connect to navision from ASP?#### Only one can survive ######0 -
Wic,
If you're still having problems connecting to Navision, I've just managed to do it.
Read my last post in the thread "ASP with Native Navision DB" (My reply to Visgold)
Hope it helps.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions