|
|
Be carefull if using sp_OACreate to run a COM component. ActiveX dll's typically run in process which means they are running in the same memory as your database. A badly written dll is likely to corrupt memory in the SQL Server environment which could be containing some of your data. Although you can get it to run out of process it is not an easy thing to set up. An ActiveX.exe will run out of process by default.
Jon
|
|
|
|
|
Hello,
I am developing an application where I need to load custom data to Analysis Server (MS-OLAP) without going through any OLE DB
Provider. I am able to load data into dimensions/cubes using Microsoft OLE DB provider for ODBC Drivers. But my requirement is loading data at runtime from a buffer. Is there any way to do this? Are there any APIs which can help me to load this data directly?
Thanks & regards,
|
|
|
|
|
I found many articles in web and feel it is not clear for connect Oracle 9i later with .net framework 2.0 beta 2.
Some namespace like OracleClient could not be used,and new System.Data.Common does not have examples.
The ODP.NET seems need to download some libary.After downloading a lib writen at 2002, the vs.net 2005 does not has any change.
Could you show me some examples?
Thanks a lot!
|
|
|
|
|
Hi!
One possibility is to use an oleDBConnector (using System.Data.OleDB).
OleDBConnection oleDdCon = new OleDbConnection("Provider=OraOLEDB.Oracle;Data Source=" + sDataSource + ";User ID=" + sUserID + "; Password=" + sPWD);
oleDBCon.Open();
-- modified at 7:49 Wednesday 14th September, 2005
|
|
|
|
|
Hi, I'm still new to sql server 2005 express integrated with VS.NET 2005 Beta 2. I'd like to import my data from Access into my newly created table in sql server 2005 express. How can I do so? Thank you so much.
KiT
|
|
|
|
|
What you like/dislike at OODBMS ?
What you want from a OODBMS ?
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitaire oriented
|
|
|
|
|
how to change the permits on a data base in csharp
|
|
|
|
|
Check if your database management system suport GRANT / REVOKE
SQL commands !
|
|
|
|
|
If you talk about how to grant and revoke permissions
you can send it as sql statment to sql server
SqlCommand sqlCommand =new SqlCommand("GRANT SELECT ON authors TO xyz",yourConnection);
sqlCommand.CommandType=CommandType.Text;
sqlCommand.ExecuteNonQuery();
MCAD
|
|
|
|
|
i ned to do a system same that the enterprise manager in csarp and i need help how to do or change the permits in the data base and what tables have
|
|
|
|
|
if you ant to build tool like Sql server enterprise manager you can use SQL-DMO if you want to builed it in managed way you can look at
QueryCommander SQL Editor
[^] as start
MCAD
|
|
|
|
|
SQLDMO is the easy way.
Also you can use system tables and system stored procedures: sysobjects, etc.
|
|
|
|
|
Hi,
I have a several tables defined by an xsd schema which are also
loaded into an ADO DataSet via DataSet.ReadXMLSchema(...)
(they are of the MS specific dataset schema)
I wish to create matching tables in a SQL Server database programatically
using ADO.NET (something like the complement of DataAdapter.FillSchema(...))
without having to explicitly write SQL statements after traversing the DataTable
objects (e.g. SqlCommand mySqlCommand = new SqlCommand("CREATE TABLE...")).
OR
find a utility which will convert my MS dataset xsd file into a script
which can be used, say by sqlcmd.exe, to create tables on a SQL Server 2005
instance.
Am I being too lazy, or is there an existing solution for this problem?
Thanks,
Eric Smith
|
|
|
|
|
Is this anything wrong with this query?
CREATE TABLE [1384/6] (OrderTable int NOT NULL ,OrderNo int NOT NULL,OrderTypeIDn nvarchar(20) NOT NULL,Report nvarchar(254) NOT NULL,Receptionist nvarchar(50) NOT NULL ,Cashier nvarchar(254) NOT NULL,Day nvarchar(15) NOT NULL,TimeInstant nvarchar(15) NOT NULL,Description nvarchar(254) )
I am using this query with OleDb on an access database.
-- modified at 13:25 Wednesday 31st August, 2005
|
|
|
|
|
Did you check up datatype ?? I mean comatibility of nvarchar ???
love2code
|
|
|
|
|
Hi there,
As far as my knowledge goes, I dont think so you can create tables through queries in an access database.However there is an alternate way for this using the ADOX object.I am not aware of what programming language you are working on but I am quite sure if it works with asp it has to work on any microsoft platform (.Net,vb6) .
Dim AccessTable as ADOX.Table
AccessTable.Name = "Table1"
AccessTable.Columns.Append ("Column1", adInteger)
AccessTable.Columns.Append "Column2", adVarWChar, 30
AccessTable.Keys.Append ("PK_Column1", 1, "Column1") 'Add a primary key
Hope this helps
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
Access doesn't recognise nvarchar data type.
You must replace nvachar data type with text !
|
|
|
|
|
[kos nagid],the problem was the day nvarchar(15) which Day is a pre reserved word for access........;P
|
|
|
|
|
First) If in Tools menu > Options > Tables/Queries > Is not checked "SQL Server (ANSI 92) Compatible syntax - This database" (which is IMPLICIT option in Access)
then NVARCHAR is not recognise by Access. Instead you must use Text data type.
Solution: query must be rewrite thus:
CREATE TABLE [1384/6] <br />
(<br />
OrderTable int NOT NULL ,<br />
OrderNo int NOT NULL,<br />
OrderTypeIDn text(20) NOT NULL, <br />
Report text(254) NOT NULL,<br />
Receptionist text(50) NOT NULL ,<br />
Cashier text(254) NOT NULL,<br />
Day text(15) NOT NULL,<br />
TimeInstant text(15) NOT NULL,<br />
Description text(254) <br />
)<br />
Second) If in Tools menu > Options > Tables/Queries > Is checked "SQL Server (ANSI 92) Compatible syntax - This database" then NVARCHAR is now recognise by Access
but the problem is "Day" field name wich is reserved word because is the name of DAY function from SQL Server - DAY(date) return a integer representing number of day (between 1 and 31)
Solution:
<br />
CREATE TABLE [1384/6] <br />
(<br />
OrderTable int NOT NULL ,<br />
OrderNo int NOT NULL,<br />
OrderTypeIDn nvarchar(20) NOT NULL,<br />
Report nvarchar(254) NOT NULL,<br />
Receptionist nvarchar(50) NOT NULL ,<br />
Cashier nvarchar(254) NOT NULL,<br />
DayField nvarchar(15) NOT NULL,<br />
TimeInstant nvarchar(15) NOT NULL,<br />
Description nvarchar(254) <br />
)<br />
Ok ?
---
object oriented
uml oriented
iconix oriented
sql oriented
truespace oriented
---
solitare oriented
|
|
|
|
|
<ticker> <name> <date> <close> <corp-action> <class>
524348 AARTI DRUGS 8/1/2005 162 Pharm-Ind-B Drug
524348 AARTI DRUGS 1/3/2005 165
524348 AARTI DRUGS 1/3/2005 170
524208 yyyyy INDUST 1/3/2005 365
524208 yyyyy INDUST 8/1/2005 150 Chemicals
524208 yyyyy INDUST 8/1/2005 121 Chemicals </code>
I wanted to get result something like this:
524348 AARTI DRUGS 8
524208 yyyyy INDUST 244
that is <ticker>,<name>, difference between the maximum and minum <close> prices
thanks in advance
-- modified at 5:41 Wednesday 31st August, 2005
|
|
|
|
|
|
Colin Angus Mackay wrote:
Does this help?
Yes, it did the trick.
Thank you Colin Angus Mackay
|
|
|
|
|
don't we have to set a distinct on ticker and name to have them once ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
don't we have to set a distinct on ticker and name to have them once ?
No, becuase the GROUP BY clause is being used to define the level of aggregation. The query is saying that it wants only one row per ticker & name combination and that aggregation functions will be used on other columns to roll them into one value. In this case the MIN() and MAX() functions are used to create one value from the "close" column based on all the values within each ticker/name combination.
For example.
Lets say that the data is something like this:
Ticker Name Close
PRD Pernod Ricard 9000
PRD Pernod Ricard 9058
PRD Pernod Ricard 8945
PRD Pernod Ricard 8988
SSE Scottish & Southern Elec 978
SSE Scottish & Southern Elec 977
SSE Scottish & Southern Elec 969
SSE Scottish & Southern Elec 975
EZY EasyJet 235
EZY EasyJet 240
EZY EasyJet 233
EZY EasyJet 237
EZY EasyJet 232 Now we apply the SQL statment:
SELECT Ticker, Name, MIN(Close) AS MinClose, MAX(Close) as MaxClose
FROM StockData
GROUP BY Ticker, Name The result will be:
Ticker Name MinClose MaxClose
PRD Pernod Ricard 8945 9058
SSE Scottish & Southern Elec 969 978
EZY EasyJet 233 240 If you attempt to put any other columns in the SELECT you will get an error to say that they must either be used in an aggregate function or in the GROUP BY clause.
Does this help?
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
-- modified at 14:21 Wednesday 31st August, 2005
|
|
|
|