Topics Search

Disabling "Unicode Compression" property by SQL Query

Disabling "Unicode Compression" property by SQL Query
Views: 27
Is it possible to have a SQL statement that can disable the unicode compression property on a column ?

Something in the lines of :

ALTER TABLE MyTable ALTER COLUMN MyColumn DISABLE UNICODE COMPRESSION
Sponsored Links:

More topics

 

Create Property

Preview
Using CreateQueryDef() to create Queries. Using the following code.

With DB
Set qdfNew = .CreateQueryDef("NewQryDef", "SELECT * FROM Categories")

End With

Works Fine.

I am having a problem in creating a Property using the CreateProperty Method to create the property "Description" so I can add remarks in the "Description" property as to what the query is intended to do.

Is there anyone out there that can share information as to how to use the CreateProperty to add the Description property and then fill in a remark?
 

Shortcut to SQL Query (View)?

Preview
Is there a keyboard shortcut to open a new query in SQL view?

I find myself encouraging carpal tunnel by:
> going to "queries"
> "new query"
> "design view"
> closing the "show table" dialog box
> right clicking the new query
> finally selecting "SQL view".

There has GOT to be an easier way that this 6-step process to ~run a query~ in a _database_ . but I haven't run across it yet though
 

inserting unicode control characters in CSV file

Preview
My Access project includes producing a comma-delimited (CSV) file for later presentation to an email program (LISTSERV Maestro). I'd like to be able to incorporate unicode control characters (e.g., CR/LF, etc) into the file to format the email. How do I do this? Here's the line that produces a record:

Print #1, EmailAddress & "," & sLastName & "," & sFirstName & "," & aCoursePrint(0) & "," & aCoursePrint(1) & "," & aCoursePrint(2) & "," & aCoursePrint(3) & "," & aCoursePrint(4) & "," & aCoursePrint(5)

For example, how could I insert a CR/LF after sFirstName and a Horizontal Tab (HT) before aCoursePrint(0)?
 

Changing the connection information on a linked QUERY in Access 2007

Preview
This is about linked queries, not linked tables. With no linked tables, the Linked Table Manager is disabled.

I know how to see the connection of a linked query, linked to SQL Server: ?CurrentDB.QueryDefs("create").Connect
"ODBC;DRIVER=SQL Server;
SERVER=PRODSERVER;DATABASE=proddatabase;Trusted_Co nnection=Yes"
I need to change the server name in the connection.

I tried in the Immediate window
CurrentDB.QueryDefs("create").Connect = ".test server name."
but that did not change the connect property.

How do I change the connect property?
 

Avoiding duplication in a table.

Preview
I have an append query "QryInvoiceGrouped" and I have set its "top value" property to 1.

Therefore when I run this query it will append this 'top value' into the destination table "LedgerTxns".

but I need some setting in the table design grid to ensure this procedure cannot be doubled up by inadvertently running the append query twice.

A relevant unique field in the appended data is "OrderNo" and I need some function to insert into the "OrderNo" field property "ValidationRule"
 

Update query in access VBA

Preview
I m using access 2007. I want to use following update query in access vba but its giving error. Query is:

Docmd.RunSQL ("UPDATE property set property.status="& "'empty'" & " Where property.propertyid="& me.cmbpropertyid.value &"")

It gives the following error:
Missing ),], or item in query expression '(property.propertyid=4'.
 

Caption Property & Queries

Preview
How can I change the name of a Field in a query when the Caption Property has been set for the field in the underlying table? For example, table tblTest has a field named "Company Number". The Caption Property for this field has been set to "CompanyNbr". I want to create a query on this table and change the name of the field to "Co". I've tried "Co: [Company Number]", but the field name in the query is "CompanyNbr". I've tried "Co: [CompanyNbr]", but that results in a "Enter Parameter Value" dialog box for "CompanyNbr".

I realize I could simply delete the Caption. However, this is a database I receive weekly from an external source, and it has many fields in it.

This problem occurs in both Access 2003 &amp
 

Update Query - Record is too large

Preview
I am trying to update (2) fields from a temp table to a master table. Both fields are defined as memo, with unicode compression as No. I tried it as Yes as well but get the same error 'record is too large'. Do you have any suggestions to try?

I checked the field lengths on characters for the (2) fields and there is nothing over 255.
 

SQL Server Compatiblity "disabled" LIKE Operator

Preview
The database I am working on will eventually be connected to SQL server. As an experiment I checked the box, "SQL Server Compatible Syntax (ANSI92)" under "Access Options", "Object Designers", "Query Design". That "disabled" the following line of code:

strCriteria01PVT = "Ucase(Trim(ProjectName)) like ""*" & UCase(Trim(Me.Text4)) & "*"""

Of course, unchecking the box restored the operation of the code.

Is there any benefit to selecting the option: "SQL Server Compatible Syntax (ANSI92)"?
 

Column Headings For Crosstab Query

Preview
I am passing a sql statement for a crosstab query, as such, in VB Code:
___________
strSQL = "TRANSFORM.
"SELECT .
"FROM .
"WHERE.
"GROUP BY .
"PIVOT myField IN ('Apple', 'Orange', 'Banana')

CurrentDb.QueryDefs("myQuery").SQL = strSQL
____________

If I look at the ColumnHeading property in design, it's set to 'Apple', 'Orange', 'Banana'

The query in Access however is sorting as such. Banana, Orange, Total, Apple

Why isn't my PIVOT IN line sorting the column headings in the order I want!?!?