|
|
Hi folks,
last week I've been thrown into two new techniques: MDX and Dundas maps.
The task is to query a cube for region-related data and display them in a report using a Dundas map (for Reporting Services) of Germany.
I don't have difficulties getting the data via MDX, and with a similar (faked) SQL query result I can use the map. Looks great.
When I connect the MDX 'dataset' to the map, everything seems to fit - but when viewing the report ist insists there would be no data...
At the Dundas support forum I've been told that
<quote>The map control for SSRS is not designed to accept data from an OLAP cube, it expect the data to come in a "flat" form which is simply a certain number of columns and rows.
The helping hand at Dundas asked me <quote>Is it possible to write an MDX query that will produce a flat result set? - and I have to pass the question on, for I haven't found a way yet...
Any suggestions welcome!
Cheers,
Juergen
|
|
|
|
|
I basically need to know the best, easiest way for a user to transfer MS Access table data via e-mail to another Access Database table.
|
|
|
|
|
.1)Export the table to a flat file via an export wizard or VBA code.
.2)Zip the file.
.3)Email the file to the recipient.
.4)The recipient unzips the file.
.5)On the recipient's computer the database either has an import VBA method or the user imports the table via a wizard into the database.
Regards
Guy
You always pass failure on the way to success.
modified on Monday, March 3, 2008 8:45 AM
|
|
|
|
|
Hi, I am using dataset for playing with data and wanted to create an additional column that stores logarithm (log) of another column. I tried to use number of options including the one below but still have trouble making the program work.
dtRec.Columns.Add("sumXY", Type.GetType("System.Double"), Math.Log("recflow"))
recflow is an existing column of the dataset and I want log values of reflow to be stored in new sumXY column.
Any suggestions!!
Amanjot
|
|
|
|
|
|
First of all, don't mark your posts as URGENT. You're not paying anyone for their help, so be prepared to wait.
You haven't stated what type of database you are using. Presumably it is file-based, Access maybe?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
Connection strings for Access require an absolute path to the database file. You will need to construct connection string with the path to the database file yourself in code. You can get the path that your application is executing from by calling Environment.CurrentDirectory . Then append the name of your Access database file.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks a lot I will try it today
Sadaf
|
|
|
|
|
thanks 4 ur kind help
I tried it but not there is a 2nd problem which is as follows:
my code is:
string currentDirectory = System.Environment.CurrentDirectory;
OleDbConnection con = new OleDbConnection();
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + currentDirectory + "\\dbLetters.mdb';Persist Security Info=False";
this.oleDbInsertCommand1.Connection = con;
//other parameters
this.oleDbInsertCommand1.Parameters["Subject"].Value = this.txtSubject.Text;
this.oleDbInsertCommand1.Parameters["RefNumber"].Value = this.txtRefNumber.Text;
this.oleDbInsertCommand1.Parameters["RefDate"].Value = this.dateTimePicker1.Value;
this.oleDbInsertCommand1.Parameters["OutwardNumber"].Value = this.txtOutwardNumber.Text;
this.oleDbInsertCommand1.Parameters["OutwardDate"].Value = this.dateTimePicker2.Value;
this.oleDbInsertCommand1.Parameters["FileNumber"].Value = this.txtFileNumber.Text;
this.oleDbInsertCommand1.Parameters["Remarks"].Value = this.txtRemarks.Text;
con.Open();
this.oleDbInsertCommand1.ExecuteNonQuery();
con.Close();
-------------------------------
Upon execution , it is not creating a new record but always updating the last record and I have no clue to why is this happening.
Plz guide me . I shall be really thankful 2 u
Sadaf
|
|
|
|
|
INSERT INTO tblOutgoingLetters
([To], [From], Subject, RefNumber, RefDate, OutwardNumber, OutwardDate, FileNumber, Remarks)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
this is the command that I have in the CommandText property of Command object..but instead of inserting a new record into the table , it is changing the content i.e. updating the last record
Do u have any idea about why is this problem occurring?
Sadaf
|
|
|
|
|
EVERY TIME I OPEN THE SOLUTION FILE TO MAKE SOME CHANGES IN MY PROJECT , THE RECORDS ADDED AFTER USING ENVIRONMENT.CURRENTDIRECTORY ARE DELETED . HOWEVER THE RECORDS THAT WERE INSERTED INTO THE DATABASE BEFORE I USED THIS REMAIN AS IT IS.
WHAT COULD BE THE CAUSE?
Sadaf
|
|
|
|
|
Please don't shout. Pay attention to forum rule no. 6
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
This is actually a problem with you program logic. Insert statement can never update another record. So check your logic may be on insertion the program calls the update function.
Do good and have good.
|
|
|
|
|
i want to store a jpg file in oracle and want to access from vb through ado connection.
|
|
|
|
|
Hope it helps.
BOOL CMyDoc::ImportPic(LPCTSTR filePath)
{
CFile file;
file.Open(filePath,CFile::modeRead);
DWORD len=file.GetLength();
BYTE *pBuf=new BYTE[len+1];
file.ReadHuge(pBuf,len);
VARIANT varBLOB;
SAFEARRAY *psa;
SAFEARRAYBOUND rgsabound;
_RecordsetPtr pRs;
pRs.CreateInstance(__uuidof(Recordset));
pRs->Open(_T("picdata"),m_pConn.GetInterfacePtr(),adOpenStatic,adLockOptimistic,adCmdTable);
pRs->AddNew();
pRs->PutCollect(_T("name"),_T("a"));
rgsabound.lLbound=0;
rgsabound.cElements=len;
psa=SafeArrayCreate(VT_UI1,1,&rgsabound);
for (LONG i=0;i<(LONG)len;++i)
SafeArrayPutElement(psa,&i,pBuf++);
varBLOB.vt=VT_ARRAY|VT_UI1;
varBLOB.parray=psa;
pRs->GetFields()->GetItem("pic0")->AppendChunk(varBLOB);
pRs->Update();
pRs->Close();
pRs.Release();
return TRUE;
}
|
|
|
|
|
Why did you do it in C++ when the OP is using VB?
|
|
|
|
|
Yes, only the ado part may help.
|
|
|
|
|
IF EXIST(SELECT 1 FROM t where name='abc' ADN age=20 AND job='worker')
UPDATE t set num=num+1 WHERE name='abc' ADN age=20 AND job='worker'
ELSE INSERT INTO t(id,name,age,job,num) VALUES(NEWID(),'abc',20,'worker',1)
|
|
|
|
|
What is your question?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
|
Not sure where you can optimize it. Looks pretty tight. Why do you think it needs optimizing? Is it taking a long time to run?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Yes.
Two conditions duplicates.
|
|
|
|
|
I don't think you can improve this. You can't escape duplicating the WHERE clause in the EXISTS and UPDATE queries. It's not really duplication anyway - the UPDATE query is only fired under certain conditions.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|