Hi guys,
I'm having problem with case sensitive collation of SQL Database. one
my client is having case sensitive database. While developing the Data
Layer i didn't consider this scenario.
the problem is I've all Store Procedures in the Database and I'm using
sqlcommand to execute those SPs with Parameters.
for e.g.
Data Layer:
......
SqlCommand cmd = new SqlCommand();
cmd.Parameters. Add("@param1", SqlDbType.VarCh ar);
........
Case Sensitive Database:
PROCEDURE [dbo].[SPxyz]
.....
@Param1 [nvarchar](4000),
......
you can notice that the parameter in the C# Code is in small cape
"param1" while it is declare with capital latter in Database "Param1".
this is causing the failure while executing the procedure through the
code.
Is it possible to ignore the case sensitivity while executing the SP
through code?
I would appreciate your response over my Query. if there is a ways to
ignore the case, then it will save lot of time to me otherwise i've to
go through several SPs to check for the parameter casing.
thanks,
Lucky 2 7283
I learnt this the hard way in 1999.
...
My advice is to always create your dev db with case sensitivity.
(Of course you know that, and are looking for a work around that works NOW).
I don't know of a work around.
The first time I had to do it, it scarred me enough for life....that I start
out my dev db's with case sensitivity now.
Especially when I deploy to an unknown client setup.
It took about 3-4 says to fix every tsql stored procedure and view.....you
can't imagine the permutations of somthing as simple as
@EmployeeID
@EmployeeId
@employeeID
@employeeId
and a few mistypes like
@eMployeeID
Good luck.
There are of course ways to force a collation on a db create.....if you give
the client tsql scripts.
I've found that drama is harder than using a dev/case sensitive db.
"Lucky" <tu************ @gmail.comwrote in message
news:f9******** *************** ***********@w1g 2000prd.googleg roups.com...
Hi guys,
I'm having problem with case sensitive collation of SQL Database. one
my client is having case sensitive database. While developing the Data
Layer i didn't consider this scenario.
the problem is I've all Store Procedures in the Database and I'm using
sqlcommand to execute those SPs with Parameters.
for e.g.
Data Layer:
.....
SqlCommand cmd = new SqlCommand();
cmd.Parameters. Add("@param1", SqlDbType.VarCh ar);
.......
Case Sensitive Database:
PROCEDURE [dbo].[SPxyz]
....
@Param1 [nvarchar](4000),
.....
you can notice that the parameter in the C# Code is in small cape
"param1" while it is declare with capital latter in Database "Param1".
this is causing the failure while executing the procedure through the
code.
Is it possible to ignore the case sensitivity while executing the SP
through code?
I would appreciate your response over my Query. if there is a ways to
ignore the case, then it will save lot of time to me otherwise i've to
go through several SPs to check for the parameter casing.
thanks,
Lucky
I was reading that it was tough to alter the database, and I agree
with sloan that it wouldn't be too fun to do that. If you're
dynamically adding your parameters then I would consider adding a
method that will capitalize the first letter of the string. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Elliot Temple |
last post by:
Hi I have two questions. Could someone explain to me why Python is
case sensitive? I find that annoying. Also, why aren't there
multiline comments? Would adding them cause a problem of some sort?
Thanks,
Elliot
|
by: Madjid Nasiri |
last post by:
Hi,
I am basic in oracle. My Old programs write with Delphi and Databases:
Access, Paradox, MySQL, Microsoft SQL.
I write my code (SQL code) case-insensitivae, but now i need use
oracle database. The Oracle by default is case-sensitive, How can used
case-insensitive in oracle.
Thanks
Madjid Nasiri
|
by: Steve Thorpe |
last post by:
Hi,
How Can I create a case sensitive unique index so that A1 and a1 are treated
as different ?
I dont mind if I have to make a global DB change.
Steve
|
by: aki999 |
last post by:
We need to install CI database on CS server, and there are some issues
with stored procedures.
Database works and have CI collation (Polish_CI_AS). Server has
coresponding CS collation (Polish_CS_AS). Most queries and procedures
works but some does not :-(
We have table Customer which contains field CustomerID.
Query "SELECT CUSTOMERID FROM CUSTOMER" works OK regardless of
|
by: Joe |
last post by:
Hi,
I have a login script and right now it is not case sensitive. I want to make
it case sensitive. The userid and password is stored in MS Access DB and not
in web.config. Can someone give me some clue as how to do it?
I have pasted my code to give you an idea as what code I have. This code
works fine. I only want to make it case sensitive.
Thanks in advance
| |
by: xAvailx |
last post by:
Hello:
I didn't find any documentation that notes save point names are case
sensitive, but I guess they are...
Stored Proc to reproduce:
/* START CODE SNIPPET */
If Exists (Select * From sysobjects Where Type = 'P' and Name =
|
by: syntego |
last post by:
I think I have discovered a bug in the handling of null values (vs NULL
values) passed as parameters to a stored proc.
I have always believed that the database handled NULL and null the
same. The following statement returns the expected results:
select case when NULL is null then 'SAME' else 'DIFFERENT' end from
sysibm.sysdummy1;
returns SAME.
|
by: Derik |
last post by:
Okay, I THINK this is a PHP question...
I've been mucking with PHP for awhile now, but just recently I've been
poking at some ajax stuff, and I ran into something confusing; my
Queries were coming back case-sensitive.
I.e. WHERE user_name LIKE 'd%' would return "david" but not "Daryl"
That's weirding me out- I thought sql queries were case-insensitive by
default. (Admittedly, I haven't done much work with the kind of user-
|
by: Rafe |
last post by:
Hi,
I'm working within an application (making a lot of wrappers), but the
application is not case sensitive. For example, Typing obj.name,
obj.Name, or even object.naMe is all fine (as far as the app is
concerned). The problem is, If someone makes a typo, they may get an
unexpected error due accidentally calling the original attribute
instead of the wrapped version. Does anyone have a simple solution for
this?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |