Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Friday, November 22, 2024
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
11/22/2024 11:55:56 AM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - ADO General
Forum to discuss ADO specific questions for use with SalesLogix. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to ADO General
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Referencing a system view in SQl select statement
Rick Backus
Posts: 8
Referencing a system view in SQl select statement
Posted: 24 Jul 07 5:19 PM
We use the following procedure to populate a drop-down box with a list of all tables in the SLX DB. We recently upgraded to SQL 2005 and the view list changed abit from SQL 2000. After updating the fields in the procedure I still get a "Failed to Parse SQL" on the rst.Open.... line when I try to open the form which displays the table list.
Any suggestions would be greatly appreciated.
Sub frmNJSSyncFix_WhenChange(Sender)
cboTable.Text = ""
cboField.Text = ""
cmdCancel.Caption = "Cancel"
Dim SQL, rst, strColumn
strColumn = "BASE TABLE"
SQL = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE LIKE '" & strColumn & "' ORDER BY TABLE_NAME"
Set rst = createobject("ADODB.Recordset")
rst.open SQL, Application.GetNewConnection
cboTable.Clear
While not rst.eof and not rst.bof
cboTable.Items.Add Cstr(rst("TABLE_NAME"))
rst.MoveNext
Wend
rst.close
Set rst = Nothing
Application.BasicFunctions.RefreshMainView
End Sub
[
Reply
][
Quote
]
Ryan Farley
Posts: 2265
Re: Referencing a system view in SQl select statement
Posted: 24 Jul 07 5:39 PM
Would it work to just use the SLX table and enabled view list? If so, you could use what is in the resynctabledefs table in the SLX database. Otherwise, maybe it would work better to wrap the query in a stored proc and just call that? Or use a native SQL connection to run the query.
[
Reply
][
Quote
]
Phil Parkin
Posts: 819
Re: Referencing a system view in SQl select statement
Posted: 24 Jul 07 7:11 PM
Using Resynctabledefs works:
Changes to two lines required:
SQL = "SELECT TABLENAME FROM RESYNCTABLEDEFS ORDER BY TABLENAME"
cboTable.Items.Add Cstr(rst("TABLENAME"))
[
Reply
][
Quote
]
Rick Backus
Posts: 8
Re: Referencing a system view in SQl select statement
Posted: 25 Jul 07 7:20 AM
Thanks for the input. The resynctabledefs table resolved the issue.
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 11/22/2024 12:17:09 PM