Help required with cfront and asp

sbhamidi
Member Posts: 22
I'm trying to incorporate Cfront into an asp page. I've been able to retrieve records using Visual Basic. But in VBscript/ASP, I've been facing this issue.
=======================
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'OpenTable'
/Project3/TestConn.asp, line 63
=======================
The VBscript code is as follows:
Can anyone please help?
Thanks in advance
=======================
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'OpenTable'
/Project3/TestConn.asp, line 63
=======================
The VBscript code is as follows:
dim NaviPath,flfPath,dbPath,coName,dbUser,tableNo,hRec dim curRow,cf dim tableRef set cf = createobject("Cfront.cfrontctrl.1") DriverName = "Andilaey" ServerName = "DEPLOYMENT1" NetType = "tcp" Cachesize = 1000 UseCommitCache = 0 NTAuthentication = 0 UserID = "SUPER" Password = "" DbFileName = "" NaviPath = "F:\Program Files\Navision Clients\Fin260\" LicenseFile = NaviPath + "fin.flf" cf.SetNavisionPath NaviPath cf.LoadLicenseFile LicenseFile cf.CheckLicenseFile (9110) cf.ConnectServerAndOpenDatabase DriverName, ServerName, NetType, DbFileName, Cachesize, UseCommitCache, NTAuthentication, UserID, Password CompanyName = "Test Web" cf.OpenCompany CompanyName tableRef = clng(tableRef) tableNo = clng(tableNo) tableNo = 50016 cf.OpenTable tableRef,tableNo 'This above line is line 63 ' NOT DOING ANYTHING AFTER OPENING TABLE BECAUSE ONLY A TEST cf.CloseTable tableRef cf.CloseCompany cf.CloseDatabaseThis approach works correctly in Visual Basic. The only thing missing in VBscript is the inability to declare variable "tableRef" as Long. So I tried using CLng() function to convert it that way. It hasn't helped.
Can anyone please help?
Thanks in advance
0
Comments
-
Have you found the solution to this problem?
-Steve0 -
If anyone has found a solution to this, I'd really like to hear it as well... ](*,)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