close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Database Connection

Thread began 7/08/2010 5:39 am by wayne.doherty252635 | Last modified 7/19/2010 12:01 pm by Jason Byrnes | 3319 views | 12 replies |

wayne.doherty252635

Database Connection

Hi,

I am using DataAssist 2.0.7 and have connected to a SQL database.

When I search, this works correctly and brings back information.

When I click View I get the following:
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

The same for Update.

If I click Insert and type something in like WDDDD I get:
permission denied on object 'HICOMClinicsAndDoctors', database 'PASExtract', owner 'dbo'.

If I changed the database permissions to write then the error changes to:
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

Thanks

Wayne

Sign in to reply to this post

Jason ByrnesWebAssist

your database has a column that is using one of these data types:
text, ntext, or image


the recordset created by dataassist is using the equals operator to filter that column.


this issue is being caused by the way your database is constructed.

Sign in to reply to this post

wayne.doherty252635

Can I change the recordset rather than the database structure.

Sign in to reply to this post

Jason ByrnesWebAssist

sure you would need to change any reference in the where clause that refers to a column you have defined as text, ntext, or image data type to use includes instead of equals for the comparison.

Sign in to reply to this post

wayne.doherty252635

Hi,

The database only has 2 tables and they are both set to varchar.

Thanks

Wayne

Sign in to reply to this post

wayne.doherty252635

If the tables are set as varchar why am I still getting the errors.

Sign in to reply to this post

Jason ByrnesWebAssist

the varchar data type has the same limitation, you cannot perform an equals comparison in SQL on the varchar data type in a MS SQL database.

Sign in to reply to this post

wayne.doherty252635

Hi,

I can only find 3 where commands I'm assuming its the first one where I need to change the = to includes. Is this correct because I still can't get it to work.

If you could include the changes showing which I need to change.

ADAdboHICOMClinicsAndDoctors_cmd.CommandText = "SELECT ClinicCode, DrCode FROM dbo.HICOMClinicsAndDoctors WHERE ClinicCode = ? OR ( -1=? AND ClinicCode=?)"

deleteParamsObj = WA_AB_generateWhereClause(WA_fieldNames, WA_columns, WA_fieldValues, WA_comparisons)

WA_Sql = "DELETE FROM " & WA_table & " WHERE " & deleteParamsObj

Sign in to reply to this post

Jason ByrnesWebAssist

in reality, you should change the data type used in the database rather than the SQL.

Especialy when it comes to the delete statement, you would not want to use an sql state like this:
DELETE FROM table WHERE column LIKE value


this could potentially delete an unintended record.

Sign in to reply to this post

wayne.doherty252635

Our issue is the database has been live for about a year. Its only added to occasionally, it only has 2 tables, one called ClinicCode and the other DrCode. I wanted to set this up to pass to the system administrator to add the codes rather than her contacting me.

The codes added are like CS CS4RH

Using a copy of the database we have changed the data types and each time we get an error.

The only time I can seem to get it to work is changing = to like. Includes doesn't work.

I thought using DataAssist would be easy but I'm tearing my hair out with this.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...