|
Ahhhhh.....don't have an ORA installation here to test, but if manage it, will let you know....
Sorry about that!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
I have a web-server that has an MSDE database. I'm finding it a bit of a pain to administer the database just using the command line tools.
Can anybody recommend a light-weight visual tool that has the main functionality of SQL Enterprise Manager. (In particular, Users and Roles configuration).
I'd prefer a desktop app rather than a web-hosted app.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
If you have Visual Studio 6, then you get the MSDE for Visual Studio - which includes EM, and QA. If VS.NET, then can do alot of jobs through Server Explorer.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
RichardGrimmer wrote:
If you have Visual Studio 6, then you get the MSDE for Visual Studio - which includes EM, and QA. If VS.NET, then can do alot of jobs through Server Explorer.
Thanks, but I need something to install on the remote web-server. The machine is locked down and so I can't access it remotely apart from via terminal services.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Here is a web app
http://www.microsoft.com/downloads/details.aspx?FamilyID=C039A798-C57A-419E-ACBC-2A332CB7F959&displaylang=en
|
|
|
|
|
Does anyone know how to use Named Commands in ADO from C++? The MSDN shows how to use Named Commands from VB, but there is no mention of C++.
Thanks.
|
|
|
|
|
It probably requires some smart tricks with IDispatch . VB does that kind of thing behind the scenes, but you'll probably find it easier simply to keep a pointer to the command object around.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
select * from mytable where datecreated > (CONVERT(varchar(30),DATEPART(year, GETDATE())) + '-' + CONVERT(varchar(30),DATEPART(month, GETDATE())) + '-' + CONVERT(varchar(30),DATEPART(day, GETDATE())-1)) + ' 12:07:00'
|
|
|
|
|
Change the type of the column, datecreated, to be of date type instead of string or varchar type. The query would then be
select *
from mytable
where datecreated > to_date(to_char(trunc(sysdate-1),'YYYY-MM-DD')|' 12:07:00'),'YYYY-MM-DD HH:MI:SS');
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
I would agree Chris. Make sure the DateCreated column is a dateTime datatype and the parameter being passed is the same DateTime datatype. Also, you can put an index on the DateCreated column.
Create Index idx1 on myTable (DateCreated)
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Chris Meech wrote:
select * from mytable where datecreated > to_date(to_char(trunc(sysdate-1),'YYYY-MM-DD')|' 12:07:00'),'YYYY-MM-DD HH:MI:SS');
following not recognised by query analyzer/ T-Sql
trunc
to_date
to_char
|
|
|
|
|
Anonymous wrote:
query analyzer/ T-Sql
Sorry. That suggests you are running this on SQL Server. My example was from an Oracle database. TRUNC is just a truncation routine. In this case, the sysdate call returns a current datetime value from which the time value is truncated. TO_DATE, and TO_CHAR are just conversions routines to convert strings to dates and vice versa. There should be similar functions available on SQL Server, I would assume.
Chris Meech
We're more like a hobbiest in a Home Depot drooling at all the shiny power tools, rather than a craftsman that makes the chair to an exacting level of comfort by measuring the customer's butt. Marc Clifton
VB is like a toolbox, in the hands of a craftsman, you can end up with some amazing stuff, but without the skills to use it right you end up with Homer Simpson's attempt at building a barbeque or his attempt at a Spice rack. Michael P. Butler
|
|
|
|
|
How to get 'IRowsetFind' interface in oledb sdk !
dear all:
i will use following code in my program(C++) :
discover 'pICommandProperties->SetProperties(1,rgInitPropSet);' return failed code 'DB_S_ERRORSOCCURRED'
so 'pIRowset->QueryInterface(IID_IRowsetFind,(void **)&pIRowsetFind);' return failed!
dear all, please help me! how to get 'IRowsetFind' interface in oledb sdk , and how to use 'IRowsetFind->FindNextRow()'
InitProperties[0].dwPropertyID=DBPROP_IRowsetScroll;
InitProperties[0].dwOptions=DBPROPOPTIONS_REQUIRED;
InitProperties[0].dwStatus=DBPROPSTATUS_OK;
InitProperties[0].colid=DB_NULLID;
InitProperties[0].vValue.vt=VT_BOOL;
InitProperties[0].vValue.lVal=VARIANT_TRUE;
InitProperties[1].dwPropertyID=DBPROP_IRowsetFind;
InitProperties[1].dwOptions=DBPROPOPTIONS_REQUIRED;
InitProperties[1].dwStatus=DBPROPSTATUS_OK;
InitProperties[1].colid=DB_NULLID;
InitProperties[1].vValue.vt=VT_BOOL;
InitProperties[1].vValue.lVal=VARIANT_TRUE;
rgInitPropSet[0].cProperties=2;
rgInitPropSet[0].guidPropertySet=DBPROPSET_ROWSET;
rgInitPropSet[0].rgProperties=InitProperties;
hr=pICommandText->QueryInterface(IID_ICommandProperties,(void **)&pICommandProperties);
hr=pICommandProperties->SetProperties(1,rgInitPropSet);
if (DB_S_ERRORSOCCURRED==pICommandProperties->SetProperties(1,rgInitPropSet))
cout<< "test";
if(FAILED(hr))
{
cout<< "OLEDB Error !\r\nExecute Failed To Set Rowset Properties";
}
hr = pIRowset->QueryInterface(IID_IRowsetFind,(void **)&pIRowsetFind);
if(FAILED(hr))
{
cout << "Failed to get IID_IRowsetFind interface.\n";
cout << endl;
} //end if
laker
|
|
|
|
|
I am using the Information Schema to retrive a list of tables and their columns:
SELECT TABLE_NAME, COLUMN_NAME,
DATA_TYPE, CHARACTER_MAXIMUM_LENGTH,
ORDINAL_POSITION
FROM INFORMATION_SCHEMA.columns
ORDER BY TABLE_NAME, ORDINAL_POSITION
This works fine but I get all the tables when I just want the user tables. This their any way to limit the results to just these tables. Also is their a way to determine what columns are primary keys. What other information schema would be useful?
Thanks for your help in advance.
Brian
|
|
|
|
|
Can I use ATL and MFC in an extended stored procedure (ESP)? In Santash Rao's sample "Tutorial on Extended Stored Procedures for MS SQL Server v7.0", he says that SQL Server uses LoadLibrary to load ESP DLL's. MSDN doc says AfxLoadLibrary (rather than LoadLibrary) must be used to load DLLs using MFC. His sample uses MFC. Is there a bug in his sample (the use of MFC) or is he wrong about SQL Server using LoadLibrary?
Jim Cutler
|
|
|
|
|
Yes, I believe you can use these libraries.
AfxLoadLibrary is intended for use within an MFC application or library to load another MFC library which extends MFC classes - what the documentation refers to as an 'MFC Extension DLL'. It simply takes a critical section object before calling LoadLibrary to ensure that certain MFC global structures are not corrupted in a multithreaded program by the code that runs in the extension DLL (basically adding itself to the list of loaded modules).
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks, Mike. You're right. I had missed MSDN article 249235 which explains that the AfxLoadLibrary doc is incorrect in that AfxLoadLibrary only applies to extension DLLs not all MFC DLLs. Thanks, again. -- Jim
Jim Cutler
|
|
|
|
|
Hello ,
I just finished developing a program using Microsoft Desktop Engine with C# as the front end. Everything is okay on my system. But, on trying to deploy it on a different system it gives an error message that it can open the database.
This is my first time in using the Microsoft Desktop engine. All this while I have been using Access as my database engine and normally what I do after developing a program is to transfer the Database file in Access after installation to the client’s system and everything will be okay. But with the Desktop Engine what I did was to
1) Install it on the client computer
2) Transfer the Database file to the client’s system.
On running it was giving me message that it can’t open it.
I would be glad if anybody can show me how Microsoft Desktop Engine is deployed together with a program developed using it as the database engine.
Thanks in anticipation.
|
|
|
|
|
I don't think you can just up and transfer the database file. Try doing this instead:
osql -U[username] -P[upass] -S[database] -Q "BACKUP DATABASE [database] to DISK='c:\blah.backup'"
Move blah.backup to the new system, then run the same command with statement "RESTORE DATABASE [database] from DISK='c:\blah.backup'"
This should move the data + schema. You'll probably want to run it as sa, so a sample command is:
osql -Usa -Ppassword -SCOMPNAME\DBNAME -Q "BACKUP test01 TO DISK='C:\backup'"
HTH
-earl-
|
|
|
|
|
I'm guessing the user/login you're using on the production system lacks the access you have on your development system. Check user priviledges in the production database.
|
|
|
|
|
|
Hi Gurus:
i m new to Database programing in visual C++ . i know ADO in Visual C++ with MS Acces but getting confused to do with SQL Server, can any one help me .
Thanks in Advance .....
"Winner's don't do different things , they do things differently "
|
|
|
|
|
what is the problem exactly ?
www.connectionstrings.com[^] has the connection string you need.
after you open the sql db querying it is similar to access.
|
|
|
|
|
Great site! Thanks for posting it.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
Folks,
I mostly do systems programming but got suckered into writing an app for a business run by my brother. This is a POS system which is backed by SQL Server. I'm using WTL on the client and ODBC (because it seemed simple / straightforward) to communicate with the db.
The question: there are a series of queries / reports that are run against the server. Exactly what is included in any individual report is variable -- eg a net sales report may or may not include gift certificates, employee discounts, etc.
My question: what is the best strategy for passing query results around? They can be (1) displayed on screen, (2) saved to CSV, or (3) printed. I expect there may be future options in the future, such as blowing them directly into QuickBooks.
Do people typically pass around the SQL statement handle and let the various consuming functions directly pull data via SQLFetch? That seems like a really bad idea. I currently have the SQL functions isolated and pull query results into an internal data structure -- vectors of structs right now. Unfortunately, I have to create structs for each query and pass around vectors. How do you deal with the fact that there are many optional fields -- just create an entry in the struct for each potential field? Also, what is the most convenient manner to deal with the fact that certain fields may be null?
Are there better ways to do this?
Thanks,
Earl
|
|
|
|