Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all

 

Simple questions, have a column name in my database called tempCallRef. Now I am doing a select * on the particular table and I and inserting the results into a dataset which is later binded to a third party reporting tool. When I view the report in the reporting tool the column name for tempCallRef is tempCallRef, and I would like to change this to something more appropriated as if anybody else looks at it, it looks un-professional. I am trying to do the following statement but am running into problems when I do a project build: Select tempCallRef as Call, column2, etc. however I am getting an error that tells me there is a problem near the word Call.

 

Any suggestions??

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

  • *Experts*
Posted

Couple of things to try:

1. To alias the columns, make sure you surround the name in brackets:

SELECT tempCallRef as [Call], column2

 

2. If using Crystal reports, I believe you can manually change the column headers after you've done your "binding". The column headers are only defaults.

 

3. If using a DataSet for binding, most binding grids and maybe reports can read the DataColumn's Caption. The Caption defaults to the FieldName (or maybe Name?) in the DataSet but you can change the Caption.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...