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!

cfquery

Status
Not open for further replies.

theevilone

IS-IT--Management
Aug 19, 2001
52
GB
Hi,

I have been doing cfquery along the lines of

<cfquery name=&quot;xxxx&quot; dataSource=&quot;xxxx&quot; username=&quot;xxxx&quot; password=&quot;xxxx&quot; dbserver=&quot;xxxx&quot; dbname=&quot;xxxx&quot;>
select * from xxxx
</cfquery>

on CF 4.5. It has been working fine.

On CF MX, the same query throws up an error,
___________________________________________________

Attribute validation error for tag query.
The tag does not have an attribute called dbname. The valid
attribute(s) are
name, datasource, dbtype, sql, username, password, maxrows,
blockfactor,
timeout, cachedafter, cachedwithin, debug.
____________________________________________________

Any help would be appreciated,
Thanks,
Mary

 
The dbname attribute, along with others, is deprecated in CFMX:

From CFMX Tag Summary for cfquery:

&quot;New in ColdFusion MX: The connectString, dbName, dbServer, provider, providerDSN, and sql attributes, and all values of the dbtype attribute except query, are deprecated. Do not use them. They do not work, and might cause an error, in releases later than ColdFusion 5.&quot;

In the 4.5 docs, for dbname, it says:

&quot;Optional. The database name (Sybase System 11 driver and SQL OLEDB provider only). If specified, DBNAME overrides the default database specified in the data source.&quot;

Are you using Sybase or OLE DB? CFMX has drivers for these built-in now.

-Tek
 
Thanks for the response, Tek.

I am transferring code from one domain to another(both on hosted ISPs). They both link to SQL Server databases.

I am at a loss on how to proceed, because leaving out the dbserver and dbname results in the &quot;Data source xxxx could not be found&quot; error.

Any ideas ?,
Thanks,
Mary
 
Can't you set up a dsn using the native JDBC SQL Server driver that comes with CFMX? In previous versions of CF, I never used OLE DB because it wasn't any faster and it didn't play nice with dates; ODBC was the way to go in my opinion. As of CFMX, however, the SQL Server driver is far better than the ODBC bridge -- more stable and a lot faster from what I've seen.

-Tek
 
Thanks for the info Tek. I suspect, after conducting some tests on my local server, that the problem may lie with my ISP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top