¡@

Home 

c# Programming Glossary: varchar

How to execute a stored procedure within C# program

http://stackoverflow.com/questions/1260952/how-to-execute-a-stored-procedure-within-c-sharp-program

master go create procedure dbo.test as DECLARE @command as varchar 1000 @i int SET @i 0 WHILE @i 5 BEGIN Print 'I VALUE ' CONVERT.. @i int SET @i 0 WHILE @i 5 BEGIN Print 'I VALUE ' CONVERT varchar 20 @i EXEC @command SET @i @i 1 END EDITED using System using..

Sending an array of values to Oracle procedure to use in WHERE IN clause

http://stackoverflow.com/questions/13580245/sending-an-array-of-values-to-oracle-procedure-to-use-in-where-in-clause

You can add this comma separated input parameter as a varchar and use following where statement where ' ' PARAM_THAT_WILL_BE..

UTF-8 or UTF-16 or UTF-32 or UCS-2

http://stackoverflow.com/questions/3473295/utf-8-or-utf-16-or-utf-32-or-ucs-2

SqlServer 2005 SqlServer uses UTF 16 in some places ntext nvarchar nchar and UTF 8 in a few XML centric places without you doing.. have text expected for human consumption being put in varchar text or char fields. Use these purely for codes e.g. all ISO.. of char 2 so nchar 2 would just waste space and only nvarchar ntext and nchar for things people rather than machines will..

SQL WHERE clause matching values with trailing spaces

http://stackoverflow.com/questions/4166159/sql-where-clause-matching-values-with-trailing-spaces

I have a table called Zone with a column ZoneReference varchar 50 not null as the primary key. If I run the following query..

C# Equivalent of SQL Server 2005 DataTypes

http://stackoverflow.com/questions/425389/c-sharp-equivalent-of-sql-server-2005-datatypes

smalldatetime datetime time Character Strings char varchar text Unicode Character Strings nchar nvarchar ntext Binary Strings.. Strings char varchar text Unicode Character Strings nchar nvarchar ntext Binary Strings binary varbinary image Other Data Types.. 1 binary 1 SqlBytes SqlBinary byte Byte image None None varchar None None char None None nvarchar 1 nchar 1 SqlChars SqlString..

Different ways of passing sqlCommand parameters

http://stackoverflow.com/questions/4624811/different-ways-of-passing-sqlcommand-parameters

Bob Having the length of the field in the passing of the varchars I assume is not preferable as it's a magic value which may.. Is this correct Does it cause any issue passing a varchar in this way performance or other I assume it defaults to varchar.. in this way performance or other I assume it defaults to varchar max or the database equivalent. I am reasonably happy this will..

Getting return value from stored procedure in C#

http://stackoverflow.com/questions/706361/getting-return-value-from-stored-procedure-in-c-sharp

QUOTED_IDENTIFIER ON go ALTER PROCEDURE dbo . Validate @a varchar 50 @b varchar 50 output AS SET @Password SELECT Password FROM.. ON go ALTER PROCEDURE dbo . Validate @a varchar 50 @b varchar 50 output AS SET @Password SELECT Password FROM dbo.tblUser..

Query extremely slow in code but fast in SSMS

http://stackoverflow.com/questions/7637907/query-extremely-slow-in-code-but-fast-in-ssms

right from ada.SelectCommand.CommandText declare @clientID varchar 200 set @clientID '138' declare @dt datetime set @dt '9 19 2011.. SSMS script you declare it as VARCHAR declare @clientID varchar 200 Due to the rules of Data Type Precedence the Where client_id.. in the SQL text where client_id cast @clientID as varchar 200 . The first solution is superior because it solves the cache..

Import XML to SQL using C#

http://stackoverflow.com/questions/772946/import-xml-to-sql-using-c-sharp

tables that look like this CREATE TABLE dbo . Racuni BROJ varchar 12 NULL DATUM datetime NULL TS datetime NULL USER_ID int NULL.. datetime NULL TS datetime NULL USER_ID int NULL KASA_ID varchar 3 NULL TOTAL float NULL STATUS varchar 1 NULL ARH varchar max.. int NULL KASA_ID varchar 3 NULL TOTAL float NULL STATUS varchar 1 NULL ARH varchar max NULL ON PRIMARY Create Table Rac_Npl..

How to pass an array into a SQL Server stored procedure

http://stackoverflow.com/questions/11102358/how-to-pass-an-array-into-a-sql-server-stored-procedure

create a function CREATE FUNCTION dbo.SplitInts @List VARCHAR MAX @Delimiter VARCHAR 255 RETURNS TABLE AS RETURN SELECT Item.. CREATE FUNCTION dbo.SplitInts @List VARCHAR MAX @Delimiter VARCHAR 255 RETURNS TABLE AS RETURN SELECT Item CONVERT INT Item FROM.. be CREATE PROCEDURE dbo.DoSomethingWithEmployees @List VARCHAR MAX AS BEGIN SET NOCOUNT ON SELECT EmployeeID Item FROM dbo.SplitInts..

SQL Server: Dynamic where-clause

http://stackoverflow.com/questions/144550/sql-server-dynamic-where-clause

Tables Ingredients IngredientsID INT PK IngredientsName VARCHAR Recipes RecipesID INT PK RecipesName VARCHAR IngredientsRecipes.. VARCHAR Recipes RecipesID INT PK RecipesName VARCHAR IngredientsRecipes IngredientsRecipesID INT PK IngredientsID..

anyway see why I get this “Concurrency Violation” in these few lines of code??? Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

http://stackoverflow.com/questions/1599230/anyway-see-why-i-get-this-concurrency-violation-in-these-few-lines-of-code

INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT emp_firstname VARCHAR 100 NOT NULL emp_lastname varchar 100 not null the code public..

How to use the default Entity Framework and default date values

http://stackoverflow.com/questions/1609304/how-to-use-the-default-entity-framework-and-default-date-values

with a date field that contains a default value of CONVERT VARCHAR 10 GETDATE 111 which is ideal for automatically inserting the..

Problem with using OleDbDataAdapter to fetch data from a Excel sheet

http://stackoverflow.com/questions/3817378/problem-with-using-oledbdataadapter-to-fetch-data-from-a-excel-sheet

Properties the JET will set the all column type as UNICODE VARCHAR or ADVARWCHAR irrespective of ˜ImportMixedTypes key value.hey..

linq to entities case sensitive comparison

http://stackoverflow.com/questions/3843060/linq-to-entities-case-sensitive-comparison

on your Sql Server ALTER TABLE Thingies ALTER COLUMN Name VARCHAR 25 COLLATE Latin1_General_CS_AS For more information on the..

How can I generate database tables from C# classes?

http://stackoverflow.com/questions/47239/how-can-i-generate-database-tables-from-c-sharp-classes

I'd expect the following SQL CREATE TABLE Foo Property1 VARCHAR 500 Property2 INT I'm also wondering how you could handle complex.. typeof int BIGINT dataMapper.Add typeof string NVARCHAR 500 dataMapper.Add typeof bool BIT dataMapper.Add typeof DateTime.. CREATE TABLE FakeDataClass ID BIGINT AnInt BIGINT AString NVARCHAR 255 AFloat FLOAT AFKReference BIGINT CREATE TABLE FKClass ID..

Query extremely slow in code but fast in SSMS

http://stackoverflow.com/questions/7637907/query-extremely-slow-in-code-but-fast-in-ssms

in your application. This line in your application adds a NVARCHAR parameter ada.SelectCommand.Parameters.AddWithValue @clientID.. ClientID while in the SSMS script you declare it as VARCHAR declare @clientID varchar 200 Due to the rules of Data Type.. in your query is not SARG able where @clientID is of type NVARCHAR I'm making a leap of faith and assume that client_id column..

SCOPE_IDENTITY() always returning 0

http://stackoverflow.com/questions/8633821/scope-identity-always-returning-0

with ExecuteScalar CREATE PROCEDURE dbo.QuickExample @Name VARCHAR 50 AS INSERT INTO dbo.MyTable Name VALUES @Name SELECT SCOPE_IDENTITY.. output parameter CREATE PROCEDURE dbo.QuickExample @Name VARCHAR 50 @Id INT OUTPUT AS INSERT INTO dbo.MyTable Name VALUES @Name..

How Can i display the output of SQL “PRINT” Command in C#?

http://stackoverflow.com/questions/8689336/how-can-i-display-the-output-of-sql-print-command-in-c

INT DECLARE @count4 INT DECLARE @count5 INT DECLARE @test VARCHAR MAX DECLARE @value VARCHAR MAX SELECT @count1 COUNT mem_id FROM.. @count5 INT DECLARE @test VARCHAR MAX DECLARE @value VARCHAR MAX SELECT @count1 COUNT mem_id FROM Students_answer_Polls INNER.. of students who chose ' @test ' is ' ' ' CAST @count1 AS VARCHAR MAX END SELECT @test Polls.a2 FROM Polls WHERE poll_id @pollid..