SQL Server :: Storing IP Number In A Column In Db?

Sep 20, 2010

I want to store IP number in a column in db but which column type should I use? Of course I can use string but isn't this a waste of storage space? Can I not store IP nr in another type in db that saves space?

View 1 Replies


Similar Messages:

SQL Server :: Show 0 As First Number In Column?

Aug 24, 2010

I have database with one table and it has 4 rows.

1. I want to show a zero in front of all number. Actually i added but it doesn't show.

2. If i don't put any value in column is it possible to have minus for example instead of 0?

[Code]....

I post it like that because i can't see how to post pics directly.

P.S. The columns with numbers have checked "allow nulls".

I draw in paint so it's not so good but i think it's understandable.

View 14 Replies

SQL Server :: Sort Varchar Column With Number?

Dec 4, 2010

i have a column in my table of type varchar (50)

beek1
beek10
beek3
beek6
beek61
beek2

i want to sort in my sql querry like this

beek1
beek2
beek3
beek6
beek10
beek61

View 5 Replies

SQL Server :: Sort A Column Varchar (50) That Contains Number?

Dec 4, 2010

how to write Sql querry to sort a column of type varchar (50) that contains number

a1
a2
a3
a11
a21

instead of

a1
a11
a2
a21
a3

View 9 Replies

DataSource Controls :: Storing 15digit Or More Number In Sqlserver2005?

Feb 13, 2010

i want to store 15digits number in sqlserver2005.Presently iam using varhar(50) am i correct or wrongwhen iam using varchar(50) i getting this error The conversion of the varchar value '3521340104012721' overflowed an int column. Maximum integer value exceeded.in my stored procedure do we have any other datatype to store 15digits or may be more in sqlserver 2005 ,iwant to use only sqlserver2005his 15digit number is GPRS device serial number idonot have an idea how many digits does it contain so i mentioned 15 or maybe morei have a sample data where they have given 15digit seial no.

View 5 Replies

Storing A Column In A Variable?

Oct 22, 2010

I wanted a formatted text to be converted into unformatted text in the UI . for that I did the following

String strInput;
String strOutput;
strInput = txtEditorAnswer.Text;
strOutput = Regex.Replace(strInput, "<[^>]*>", String.Empty).Trim();
txtEditorAnswer.Text = strOutput;
txtEditorAnswer.Text = Server.HtmlEncode(txtEditorAnswer.Text);

but as it changes the value in the Database also, so its creating a problem for future. Now I need to change the text after being inserted into the database.

View 1 Replies

SQL Server Identity / Largest Number Record Id (identity) Column Can Hold

Jan 1, 2011

I am developing a asp.net application and i am using SQL Server 2008. I took a IDENTITY column as Record_ID for detail table where i will have trillions of records per year. So just want to ask whats the largest number record id (identity) column can hold and in ASP.NET which data type i should use to handle record id as i am using this id as a reference to update the table data. I don't want to end up being trapped some day.

View 1 Replies

Forms Data Controls :: Column With Nvarchar Datatype Storing The Date?

Aug 16, 2010

I have a column with nvarchar datatype storing the date. I am using a Gridview to display and edit data of that table. Now when I update the table the nvarchar column containing date in the format mm/dd/yyyy gets converted to Jun 9 2010 12:00AM format. I don't want this to be happening. I don't understand why this is happening as I don't have datetime column.

View 4 Replies

How To Get The Number Of Characters Occupied In Particular Column

May 31, 2010

I use this query for my table but it retrives the value for each row. It does not retrieve the size of the column name. I need to know the number of characters occupied in particular column. How do i get this value?

SELECT LEN(salary) AS MyLength FROM employee

View 3 Replies

DataSource Controls :: Get Max Number Of A Column?

May 17, 2010

could some one help me how can i get max number of a column in sqlserver2005.

actually in my column records are,

1,2,3A,3B,3C LIKE this format.

so how can i get max numer i.e 4 here.

View 21 Replies

C# - Add A Serial Number As The First Column In A GridView?

Jan 22, 2011

I have a Grid View . It has two bound columns. I need to have a Serial Number column as the first column.

View 2 Replies

ADO.NET :: Delete Number In Primary Key Column?

Sep 18, 2010

[Code]....

This code does not work because the primary key ID.What should I do so I can delete the ID = 1?

View 3 Replies

DataSource Controls :: Max Number In Column Of Datatable?

Jan 27, 2010

i have a column seq_no in datatable. if the column with data 2,4,5 how can i have the max number of the column. C#

View 5 Replies

Forms Data Controls :: How To Add A Row Number Column

Jan 19, 2011

I have a datagrid that I want to have a column that just lists the row number. Does the data grid have a feature that does this?

View 2 Replies

SQL Server :: Storing PDF Into SQL Or Alternatives?

Dec 10, 2010

title isn't as detailed as I hoped but I have a few questions. Traditionally I've always been a mixed mode person, storing PDFs and other things into the file system with pointers from my SQL DB to them.

Recently I've heard more people storing files into the DB directly and wonder if I'm storing files around 100-200MB in size, will I run into a lot of issues? Are there ways to compress the files other than perhaps zipping them up and storing the zip?

Finally, something I've always wondered about but never really found a good work around for... if I decided to continue with the mixed-mode storage solution, and these I need to retrieve these files for use on a website, how do I secure these files so that someone can't just randomly come and retrieve these files off the server by guessing files names, etc?

I did one work around once where I stored a set of PDFs to a non-web directory like c:pdf and setting permissions for the web account to access them. This allowed me to retrieve them using the references in the DB and provide some garbled filename so people couldn't retrieve it themselves but this all seems rather complicated.

View 1 Replies

Storing A Uploaded File In DB Or Storing It In Filesystem?

May 11, 2010

I have a File Uploader in my ASP.NET application Using C#, we can upload any type like images, documents, pdf etc.

I m storing it in the Filesystem and having only the Name of the File in DB.My doubt is can we store the entire file, images in DB. State me Which is good practice and why we need to use it.

Either file System Storage or SQL DB Storage.

View 4 Replies

Format The Column To Indian Positioning Number System Of A Datatable

Feb 11, 2010

I am using a datatable with different columns. Datatype of each column is Double. Now I want to format that column to Indian positioning number system. e.g(54,36,54,656.00). How can I do this???

View 1 Replies

Forms Data Controls :: How To Display Gridview Column Number

Feb 20, 2011

how to retrieve the column number in gridview

i am able to get the row number using this syntax <%# Container.DataItemIndex + 1 %>

but what about column number?

View 3 Replies

Forms Data Controls :: Get The Number Of 2'values In Column Of Gridview?

Jan 1, 2011

The number of 2'values in Column of gridview?

View 5 Replies

Web Forms :: Get Count Of Number Of Items In A Column Which Is Separated By Comma?

Sep 27, 2012

In a column, have many items separated by comma or whitespace. How to get count of the number of items that is separated by comma or whitespace.

For example, test column has data like 123456, 543213, 678895

How to count as 3

View 1 Replies

SQL Server :: Storing Files In A SQL Database?

Aug 16, 2010

Have a question about the best approach for file storage in a SQL database. I have a table called Widgets, and each row in the Widgets table can have multiple files. I also have another table called Extensions, and again each record in this table can have many files.

Here is what I am considering:

Approach #1:

[Code]....

That approach is very simple and easy to use, but I feel that I could merge the two file tables into one, then use lookup tables:

Approach #2:

[Code]....

The thing is, there are no duplicate or shared files between the two types of objects. So even though I feel better about approach #2, I am concerned that I may be adding additional complexity (and using more server resources to perform the joins), than needed.

View 1 Replies

SQL Server :: How To Best SQL Datatype For Storing HTML

Oct 1, 2010

I'm using Cute Editor for ASP.NET for the first time, and it's occasionally refusing to insert or update a record. Basically the records are just composed of a bunch of HTML and text. So far I can't detect a pattern to the problem and I'm wondering about my data type.

I tried VARCHAR(MAX), NVARCHAR(MAX), and NTEXT, doesn't seem to fix it.

So what is the best SQL data type for HTML?

And could that be causing CuteEditor to refuse to insert/update records? Or something else?

View 10 Replies

Storing A Word Document In Sql Server?

Mar 23, 2010

How can I store a word document using an upload control in sql server? Also is there a better way to store a word document without using an upload control

View 7 Replies

Storing And Retrieving Images With MVC And Sql Server?

Jan 15, 2010

I am designing an prototyping an app the needs to store images, similar to facebook. This will be a public facing site and I am not sure how many users I will end up with but what I am looking for is a way to efficiently retrieve them.

So far I am thinking of storing them in SQL Server varbinary columns. I have the upload code and the storage code for that. My concern is retrieving them. I can retireve and build the image tag on the fly but I am worried about having to hit the database for each one.

I have been thinking about getting all images for a user and caching them in the asp.net cache for 10 to 30 seconds. I have never had to do something like this so I would be interested in hearing a few different approaches. Obviously the images can vary in size and I was thinking about defining a size limit, but I haven't gotten that far yet.

View 3 Replies

Forms Data Controls :: Gridview Control: Get The Column Index Number

Jun 18, 2010

I have a gridview control and in need to get the column name and the column index number

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved