|
I have a c# application that does frequent checks to the database to see if a status flag in a table has changed.
After the query, I close the connection and command objects with
connection.Close() and
command.Dispose()
If I look at the current activity in SQL Server, I see each of these queries as sleeping processes that just continue to accumulate. What am I missing that keeps these processes around after the query completes?
If it makes a difference, I am using MSDE.
Thanks in advance,
Bruce
|
|
|
|
|
Hi!
I am using sql server 2000. How do I make my DB case sensitive without reinstalling sql server 2k?
Please help me on this.
"To teach is to learn twice"
|
|
|
|
|
Reinstalling won't help. You bought the wrong product. You should have purchased SQL Server 2K.
|
|
|
|
|
If you just want to change a single database, you need to run an ALTER DATABASE query, e.g.
ALTER DATABASE mydb
COLLATE SQL_Latin1_General_CS_AS This only alters the new default and how object names are interpreted; you'll need to alter any existing tables as well.
If you need to change the default collation of the database server (including the tempdb database), you should run the rebuildm tool. See also KB article 273572[^] about a problem with this tool when the source files are read-only. rebuildm lives in the 80\Tools\binn directory under the SQL Server install directory.
Note that rebuildm and setup use 'friendly' names for the collations, whereas Enterprise Manager and queries use a different naming convention. The names used in setup are listed in Selecting a SQL Collation[^], while the names used in queries may be found under SQL Collation Names[^].
There are two types of collations: those implemented using the Windows national language support functions (Windows collations) and those implemented independently by SQL Server (SQL collations). SQL collations have names beginning SQL .
|
|
|
|
|
I have an update string like this:
<br />
UPDATE pms_tools_tasks SET Status='ToDo',Assigned='kluch',Priority='2',Title='Anything',Descript='No',Notes='Just Work',CreateDate=NULL,CompleteDate=NULL,Project='',TicketBased='0',TicketID='0',UserUpdate='',Private='0' WHERE ID=7<br />
Which works fine, But if a user enters any text with an apostrophe like for instance "doesn't work" in the title field. The update no longer executes successfully. What can I do about this?
|
|
|
|
|
Don't know 100% true for mySQL but in most databases, doubling the character tells the database to use the apostrophe as a character rather than the string terminator.
You might explore escape characters as well. Take a look at the docs because you'll want to take into account any of the characters the database treats as "special". Some are treated by doubling the occurrence of the character but others may require an escape character.
|
|
|
|
|
|
How can I cancel the addnew record process when i filled some columns in the last row of the datagrid, and I change my mind and don't want to save the new row to the database? If I cancel the beforeupdate event I am still in the last row, but I want to quit from the last row and clear its columns. How can I do that?
Thanks for any advice!
|
|
|
|
|
How to get the current selected row in DataGrid without having to use DataGrid method?
Is there any way by using the DataSet method or properties?
Thank you!
Let's roll!
|
|
|
|
|
Take a look at http://www.syncfusion.com/FAQ/WinForms/default.asp#44...
Free your mind...
|
|
|
|
|
Can anybody suggest a couple good books for ADO.Net? I've found, bought and looked through several but they all tell you how to connect to a database, download the info and then Console.WriteLine() the results.
But what about real world where the data needs to be manipulated, moved, handed off, etc? Getting into the detail of evaluating data within the tables/datasets to determine what changes have been made? Taking a subset of one of the tables and creating a new table and returning only that (no, the situation does not allow the user to do their own filtering). Patience and money is starting to build constraints and unfortunately, I don't have a lot of people here to talk to for C# and .Net.
Just wondering if anybody can suggest a couple good books. I appreciate the help.
db
|
|
|
|
|
|
Microsoft Press ADO.NET core reference
nevhile.net
|
|
|
|
|
Everybody help, I have proxy server set up in LAN, how visit long-range sqlserver through ado I then -
|
|
|
|
|
Does anyone know of any third party SQL tools for .Net that aid in the development of database applications?
|
|
|
|
|
I can't remember off hand, however, I do remember seeing something on www.asp.net and also on the MSDN website under the DotNET section, not SQL.
|
|
|
|
|
In the .NET Framework there are two Base Class Libraries OLEDB and SQLCLient. Both of them can connect to a SQL server but OLEDB has togo through a COM Component which takes a performance hit. I was just wondering whether this performance hit is big enough to make me not want to use OLEDB and strictly use SQLCLient.
|
|
|
|
|
SQLClient is strictly for Microsoft's SQL Server. If your using MSSQL Server and you don't need your code to be portable(.NET isn't exactly portable yet), then I would use SQLClient.
|
|
|
|
|
Yes I know that but does OLEDB and SQLClient have a major performance difference?
TIA
|
|
|
|
|
|
|
Can CDAORecordset (in VC6 or VC7) deal with Access 2000 or 2002 ?
or.. is this just an MDAC issue?
(DB newbie)
-c
ImgSource | CheeseWeasle
|
|
|
|
|
Sadly, not an MDAC only issue. The problem is that the MFC DAO support is hardcoded to load particular versions of DAO, and won't "automatically" use the latest version. There's an MSKB article on it (Q236991), which explains how to resolve it for apps that dynamically link to MFC, and a brief explanation of what to change for apps that static-link. (They advocate a full build of MFC, but I'm sure I've seen another workaround as well).
Steve S
|
|
|
|
|
Hello there i have a project which i want to run on windows o.s.
Now the only problem i am facing is that when i use the same
#import "G:\Program Files\Common Files\SYSTEM\ADO\msado15.dll" rename("EOF", "ADOEOF")
using namespace ADODB;
i get an error and also i did a search on msado15.dll in windows 95 it was not there.
my connection string is like this.
TCHAR pAppPath[_MAX_PATH];
GetModuleFileName(NULL,pAppPath,_MAX_PATH);
// Trucating and attaching the mdb file path
CString csAppPath(pAppPath);
csAppPath = csAppPath.Left(csAppPath.ReverseFind( '\' ));
csAppPath+="\\BackUp.mdb";
// Adding other information to the mdb file
CString csConStr = "Driver={Microsoft Access Driver (*.mdb)};";
csConStr += "Dbq=";
csConStr += csAppPath;
csConStr+= ";Uid=;Pwd=;";
I could use jet ole db provider but the problem is the no driver or provider is present in windows 95 and 97.
After search on internet i found a solution about installing mdac and dcom95 and then running the thing and it worked but the redistribuatable was like 8 and 1.3 MBs which i don't want
somebody also told me to package my mdb with project and use jet engine i haven't looke at the redistributable for jet but it may be some MB'S.
The problem is there redistributables are heavy.
What i need is a simpler and smaller solution.
to using ado with msacces on windows95.
My second question is can we include just msado15.dll
without whole of the path coz system directory could be on any partition volume.
I need urget help regarding these two matters and i would be more than greatful for a viable solution
|
|
|
|
|
You could use DAO, rather than ADO, as it's lighter weight, but then you'll probably have to rewrite chunks of your code.
Your second question is easier. Using Tools/Options/Directories add the actual path of MSADO15.DLL into the INCLUDE section and use
#import <msado15.dll> rename("EOF","ADOEOF")
You need the path at compile time, not runtime, which does require that the components be installed, so you have no option to to install MDAC.
Steve S
|
|
|
|