|
DAO?!?! It's been obsolete for quite some time now. It was shipped with Office 2000 and Office XP, but there will no longer be any development or support on the technology. It was also optimized for use with Access databases. Why on earth would you be using it to get to an SQL Server?
You can't turn it off for every application. SSPI is specified on a connection basis inside the application in the connection string used to connection to the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Why does SQL Server Express 2005 save stored procedures in SQL files? That is so annoying.
"If only one person knows the truth, it is still the truth." - Mahatma Gandhi Web - Blog - RSS - Math
|
|
|
|
|
I'm wondering what the best way to implement plug-in reports is. If I use Crystal, which I haven't for over a year, I have the benefit of built-in selection parameters, so I could possibly get away with just 'dropping' the report files into a store, and having my code pull the full report name from the file somehow. The report itself will then handle the selection parameters.
If I do a custom solution, I could follow a plug-in assembly architecture, where each report is packaged as its own class library, with a custom selection screen1 and output grid.
1. Anyone recognise this ABAP/4 term?
I used to get high on life until I realized that life was cut with morons - Unknown
|
|
|
|
|
hi everybody,
i want to know how to menage the optimistic cuncurrency using timestamp.
i've already added a column for every table (timestamp type).
how i can modify the Update command to use it?
(im using C# 2005)
Thank you in advance
Enrico
VentoEngine corp.
Program your life ^^
|
|
|
|
|
During your SELECT statement you can get the timestamp and keep it for updating purpose later.
I usually save the timestamp as long variable.
On your update statement, pass the timestamp as a parameter along with the rest that you need to make sure you update the correct version of the data, e.g.
UPDATE customer<br />
SET [name] = @newname<br />
WHERE [id] = @id<br />
AND [rowversion] = @timestamp <-- timestamp value
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
|
|
|
|
|
Dear all,
I have the following case:
In a SQL db, each time a row is changed in a specific table ( say OriginalTable ) i need to insert a row for each changed column in a specific table say ( HistoryTable ) by the following values:
1- The OriginalTable Column name ( i.e. the column that its value is changed )
2- The Old value ( existing before the update process )
3- The New value ( existing after the update process )
I dont know if this can be done using SQL or programmatically from the code.
Plz, if anyone know the solution of that problem using any SQL or Code reply me as soon as possible. ( Note : my application is an ASP.Net project)
thank u all
Rania Adel
|
|
|
|
|
You can use an SQL TRIGGER to create these records automatically whenever a modification is performed. (see CREATE TRIGGER in the SQL documentation).
Also, you can use the COLUMNS_UPDATED() function to determine which columns have been changed (in order to produce the text for the column name).
Hope this helps.
Regards,
Alex
|
|
|
|
|
Anybody know the configuration or command to allow a MySQL database to allow remote host connections? ta.
regards,
Paul Watson
Ireland
Feed Henry!
K(arl) wrote:
oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!
|
|
|
|
|
You need to grant privileges to a user with an IP address.
Here's a link[^] with simple demonstration on how to set the user.
I don't think you can setup remote connection without the IP address, but I'm not an expert in MySQL though.
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
|
|
|
|
|
Thanks Edbert. I tried that but no luck. It might be another problem all together. It is a Windows box trying to connect to MySQL on a Linux box, so maybe there is a TCP/IP or port problem.
regards,
Paul Watson
Ireland
Feed Henry!
K(arl) wrote:
oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!
|
|
|
|
|
Sorry I can't help much.
Last time I setup mysql was on Windows Server 2003. The PHP-Linux guy who built a website didn't know how to work on Windows and decided to host it somewhere else Linux-friendly.
If you do searches on Google, looks like you're not the only one having trouble connecting to MySQL on a Linux box. Here's a link to mysql manual on connection problem[^] that might have what you need.
Good luck.
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
|
|
|
|
|
Hi:
please help i have a windows application connected to a local MSSQL server and i want to make the application to be used over lan, what sholud i change only the connection string so that it will work over lan and for more than one user.
please help and thanks for your time and consederation
|
|
|
|
|
cbhkenshin wrote: what sholud i change only the connection string so that it will work over lan and for more than one user.
The connection string should point to the machine that the SQL Server is installed on. If it has a named instance that is needed also. For example
Server=MyServerMachine or
Server=MyServerMachine\NamedInstance
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Dear All,
I have saved my username and password using PHP in Mysql Server. I have used PASSWORD('password').But for user verification how I will check user password from Mysql server using PHP.Because PASSWORD() one way process.
What things I have to do?
Pl anybody in help ? Any hints.
rpkumar
|
|
|
|
|
Most hash used for password is one-way hash, i.e. you cannot de-hash the value into text anymore, which is done for security reasons.
You can, however use a select statement to find if there's a user with username specified and the hashed value of the password given, i.e.
SELECT COUNT(*) FROM user<br />
WHERE username = 'user' AND pass = PASSWORD('pass')
Edbert
Sydney, Australia
"A day without sunshine is like, you know, night."
|
|
|
|
|
Hello
For my application want to store MS WORD or PDF files etc in a BLOB field in SQL Server 2005 ( .MDF file ) and I will retrieve from SQL and run SHELL Command to show that file. Can you show me any good article link or if you have any snippet for that, would you please post that here for me.
Thanks and regards
Emran
|
|
|
|
|
Hello guys,
I want your help
I want to store different files (their data) into the data base how do I do that?
I have a table called Files with one blob field FileData, the table's structure is as follows
File(FileID IDENTITY(1,1), FileData text);
I am doing this application in MFC (VS 2005).
I accepted the file name from user, opened it using CFile::open method ,read data into TCHAR buff & inserted into DB as follows,
TCHAR szBuff[_MAX_PATH];
CString strSQL = _T("INSERT INTO Files(FileData) VALUES '%s'");
CString str = strSQL;
strSQL.Format(str,szBuff);
m_pDataBase->ExecuteSQL,strSQL);
tell me if I am doing mistake by taking a TCHAR array & what is the alternate way for it.
Remember that the files could be of any type & later stage I need to read the file data back.
I am new to MFC so please help me
Thanks in advance
|
|
|
|
|
I'm trying to generate the SQL scripts of a SQL Server database automatically by the use of the ScriptTransfer method of the Database2 COM class. It would have been nice if the DROP commands would be generated for the foreign keys too but it seems impossible. I've been playing with all the options of the Transfer object but all in vain: everything gets generated but the FK DROP statements.
I don't know if it is relevant or not but here are two fragments from the C++ code that i have used so far:
// ...
#define SQL_SCRIPTING (
SQLDMOScript_ClusteredIndexes |
SQLDMOScript_Indexes | \
SQLDMOScript_IncludeHeaders | \
SQLDMOScript_PrimaryObject | \
SQLDMOScript_Drops )
// ...
pTransfer->ScriptType=(SQLDMO_SCRIPT_TYPE)SQL_SCRIPTING;
pTransfer->CopyAllTables=VARIANT_TRUE;
pTransfer->CopyAllStoredProcedures=VARIANT_TRUE;
pTransfer->CopyAllFunctions=VARIANT_TRUE;
pTransfer->CopyAllTriggers=VARIANT_TRUE;
pTransfer->CopyAllViews=VARIANT_TRUE;
pTransfer->CopyAllObjects=VARIANT_TRUE;
pTransfer->CopySchema=VARIANT_TRUE;
pTransfer->DropDestObjectsFirst=VARIANT_TRUE;
Any workaround on this issue?
"quot capita, tot sententiæ"
rechi+
|
|
|
|
|
Hi all,
I want to get the data from tables of two different database.Is it possible
Pls help
thanks
lucky
|
|
|
|
|
you can select data from tables in different databases as:
Select A.Flds , B.Flds From Server1.db1.dbo.Table1 A<br />
Inner Join Server1.db2.dbo.Table1 B A.Fld = B.Fld
Regards,
Javed
|
|
|
|
|
what is the query for displaying records with a particular date eg. Feb 02 2006 and displaying records within a range eg. Feb 02 2006 to Feb 04 2006
in which format the user have to input the date in asp.net?
i need british format. in which format i have to store the date. Please give in detail.
Thanks in advance
|
|
|
|
|
dansoft wrote: in which format the user have to input the date in asp.net?
I always use ISO format when typing SQL in Query Analyzer, but for accessing the application through ADO.NET (ASP.NET is for web applications and has nothing to do with the database). I don't worry about the date format as I use parameters. For example
SqlCommand cmd = new SqlCommand();
cmd.Connection = myConnection;
cmd.CommandText = "SELECT * FROM MyTable "+
"WHERE SomeDate BETWEEN @startDate AND @endDate";
cmd.Parameters.Add("@startDate", theStartDateTimeObject);
cmd.Parameters.Add("@endDate", theEndDateTimeObject);
SqlDataReader reader = cmd.ExecuteDataReader();
theStartDateTimeObject and theEndDateTimeObject are DateTime objects. If you use these then you don't need to know what format to write the dates in to the SQL String - and nor should you need to convert it.
The database should be used for storing information. You shouldn't really be doing any localisation functions with the database as that is all presentation layer stuff.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
can you please give me the code in vb.net format? i don't know c#.net
I need to display records with a particular date also. for eg. records having current date or any other specific date.
Thanks
|
|
|
|
|
dansoft wrote: can you please give me the code in vb.net format? i don't know c#.net
Are you serious? Its the same framework - the only differences are a few minor syntactical ones.
Dim cmd As SqlCommand
cmd = New SqlCommand()
cmd.Connection = myConnection
cmd.CommandText = "SELECT * FROM MyTable " & _
"WHERE SomeDate BETWEEN @startDate AND @endDate"
cmd.Parameters.Add("@startDate", theStartDateTimeObject)
cmd.Parameters.Add("@endDate", theEndDateTimeObject)
Dim reader As SqlDataReader
reader = cmd.ExecuteDataReader()
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
the value 1233.65774858
what i need 1233.65 but i am getting 1233.6500000000
vivek
|
|
|
|