Is there a way we can concat all field in the table(1 sql statement)(automatic) ?
The reason was before user updated or delete a record,the record will push to another table for future reference.
Hello,
Here a simple django model:
class SomeModel(models.Model):
title = models.CharField(max_length=100)
video = models.FileField(upload_to='video')
I would like to save any instance so that the video's file name would be a valid file name of the title.
For example, in the admin interface, I load a new instance with title "Lorem ipsum" and a video called "video.avi". The copy of the file on the server should be "Lorem Ipsum.avi" (or "Lorem_Ipsum.avi").
Thank you :)
Hey guys. I'm a CSS newbie and I was wondering how websites like bing.com or wolframalpha.com create their search buttons inside of of the text field? If you go to each website, you can see clearly what I mean.
Guys, I have a table called tblNames and one of my fields in this table is called 'UpFileName'. Is it possible to create an insert trigger that would automatically replace all '%20' in the UpFileName field to underscores '_'?
I'm using SQL Server 2005.
Hi,
I am trying to create a custom content type in Sharepoint where one of the multiple choice fields needs to get data from Active Directory. I've been looking on Google but haven't found any good solutions. Probably I'd have to create a custom field type?
Thanks!
Hi All,
How I can assign a sequence value to a field "UID" which is NUll in existing sqlite table, for example
table: FOO
name UID
A 1
B 2
C 100
D NULL
E NULL
F NULL
what I want is
table: FOO
name UID
A 1
B 2
C 100
D 101
E 102
F 103
Can some body help?
I want to seek an alternative for using autoincrement on my own reason...
thanks!
May I know how to add a new custom text field in TFS to show the lastest revision number?
Can anyone explain in deatil about
Making use of work item’s XML and customize TFS work items.
How to create custom window form control to add to work item.And installation of
custom control runtime
I am pulling back to the basic schema questions in Tridion 2011.
I have an embedded schema with three optional fields and I referred this schema in a content schema and marked it as mandatory.
When I create a component and save it without entering data to this mandatory field; CME is not throwing any exception and proceeds with saving.
Please let me know if there are any patches to resolve this issue.
Thanks in advance.
I wanted to use the custom field for wordpress to have a different header banner for my site here is my code:
<?php
get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="BodyWrap">
<!--MAIN CONT-->
<div id="mainCont">
<?php get_sidebar(); ?>
<div id="rotateBanner"><?php
// check for image
$image = get_post_meta($post->ID, 'image', $single = true);?>
<img class="mainImg" src="<?php bloginfo(template_url); echo $image; ?>" alt=""/>
</div>
<div id="mainCopy">
<div id="content">
<h2><?php single_post_title(); ?></h2>
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>
Now the code renders but for some reason it only renders the img path as:
<img alt="" src="http://www.testground.idghosting.com/philcom/wp-content/themes/phil"/>
here is the demosite
in the custom field I put this: image
For the value I put this: /images/sampleHead.png
I like private readonly backing fields because some objects are mostly read-only after creation, and for collections, which rarely need to be set wholesale (instead using collection methods to modify the collection).
For example:
public class BuildingType : DomainEntity
{
/* rest of class */
public IEnumerable<ActionType> ActionsGranted
{
get { return _actionsGranted; }
}
private readonly IList<ActionType> _actionsGranted = new List<ActionType>();
private readonly Image _buildingTile;
public virtual Image BuildingTile
{
get
{
return _buildingTile;
}
}
}
But as far as I remember fluent-nhibernate's
automapper never had a solution for private readonly backing fields, I'm wondering if that's changed in the last few months.
So here's my question:
How do I configure automapper or create an automapping convention to
map private readonly backing fields?
I need to do lot of refactoring (actually need to change field names) in eclipse. It is changing all occurrences, references of fields. But one thing is it is not changing getter/setter names which have been generated based on previous name.
Do we have any plugin to do this or any configuration change needed to be done?
In Ruby on Rails I'm doing something like:
Appointment.find( :first, :conditions => "staff_id = #{staff_id} AND datetimefield = #{datetime}")
... where datetimefield is of course, a datetime field. But, I only want rows where the date is equal to a given day, say 2/12/2011. I don't care about the time. What's an easy way to do this?
Thanks!
I want to create a mailbox for each user in a Domino server.
In order to maintain different mailboxes for different user.
And storing their respective mails in it.
example:
User: A
Mailbox: Amailbox storing mails of user A
I hava a data window object, in which I am fetching some attributes fromthe database to show it to the users. I want to make the computed fields read-only, so that the user can not modify them.
How can I make a computed field read-only?
I've got a visual studio deployment project and would like to add an option to view a readme file fromthe final screen.
So basically there would be a link or checkbox that the user can select if they want to view the readme.
Does anyone know of an easy way to do this?
I am in the way building some MVC Application and I really love the Data Annotations support in MVC. The build in support is good enough to enforce simple validation checkup. I wonder, how to implement unique-field validation using custom data-annotation ? For example, I have a view model that need the user to register a new login name, is there way to check (using Model.IsValid) whether the name is not existed before calling the db submit?
I have 2 classes with a LINQ association between them i.e.:
Table1: Table2:
ID ID
Name Description
ForiegnID
The association here is between Table1.ID - Table2.ForiegnID
I need to be able to change the value of Table2.ForiegnID, however I can't and think it is because of the association (as when I remove it, it works).
Therefore, does anyone know how I can change the value of the associated field Table2.ForiegnID?
Thanks.
Hi There,
I have a field in my database that contain comma seperated values these values are numbers, and I am trying to do a search and count the number of times that a number appears in that column throughout the column,
$sql = "SELECT sector_id_csv, COUNT(sector_id_csv) as count FROM cv WHERE sector_id_csv LIKE '$sectorId'";
This seems slow and does not return any results, and I know the sector_id it is search exsists in the table.
hi,
I need a sequence of text, image, video CCK fields, repeated twice in my content type.
I need to create 2 different groups (I don't want to use multi-upload functionality).
I was wondering if I have to create a new field Image - File Upload for the second group, or I can somehow to re-use the first one (which is already added, and I would like to add it twice in the second group as well).
thanks
Good day!
Despite the fact LINQ2SQL and ADO.NET Entity Framework exists there were situations when I need to revert to plain old DataSet (not typed) and friends.
While writing SQL for SqlCommand:
Is it needed to quote field and table names with []?
Is it good to prefix table names with [dbo]
I use to use this syntax:
SqlCommand command = new SqlCommand("SELECT [Field1], [Field2] FROM [dbo].[TableName]", connection);
May be there is a better way?
Thanks in advance!
Hi all,
I've got a field in my SQL SPROC resultset that is a calculated CASE statement that returns 1 or 0 (ie True/False).
When I try to use the GetBoolean method of the SqlDataReader class and exception gets thrown.
Any suggestions would be appreciated.
For example, I have a struct which is something like this:
struct Test
{
int i;
float f;
char ch[10];
};
And I have an object of this struct such as:
Test obj;
Now, I want to programmatically get thefield names and type of obj. Is it possible?
This is C++ BTW.
I was given the dawnting task of converting a ASP website to PHP and MSSQL to MySQL, and I ran into an issue that hopefully somebody can help
I have a user table which has a password field with datatype Varbinary(128), are using pwdencrypt to encrypt the password.
Is there a way to transfer that over to MySQL, and somehow i need to be able to keep the password intact... how can i go about that? any pointers would be greatly appreciated!
I am a web developer and i would like to shift my field to data warehousing.
Can anyone please give me some idea , which langauges or stuff i need to learn like cogonos , datastage, etl
or IF anyone currently working can guide me how can i start , i will thankful to you.
DO i nned to do oracle because i know mysql , sql. My basic understanding with databse is good.
Any books