|
Create a user defined variable to store the password. Build your connection string using an expression and extract the password from the UDV. And when you run your package, you can set the value for any user defined variable.
|
|
|
|
|
Thanks for the hint - i had it in front of me in the article but didn't put it together.
What a freakin nightmare, imagine having to put the connection string in clear in a bloody environment variable - is that a scream of anguish from my security person.....
It looks like the connection HAS to live in a variable. I had the idea that I could put the bits (server, UID and password) in the config table and have the package build the connection based on the config values, seems the package is ingnoring those and using the connection string in the deployment (no password).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am trying to call one dll inside pl/sql, which I have prepared though vc++. The dll works fine when I call it from any other vc++ applciation and hence tested but it's not working in the pl/sql Although I tried to test my pl/sql procedure with some windows default dll calling them from the procedure, in that case it worked fine.
Can you please help me with any hint. I have not used lib file of my dll any where. Could this be the reason?
Thank you
With Regards
Neeraj Sinha
|
|
|
|
|
Disclaimer: I'm no expert on Oracle.
Generally, when you can't call a function in a DLL from another programming language, it's due to decorated function names, also called 'name-mangling'. The C++ compiler encodes the types of the function's parameters in the name it records in the DLL, because the linker and OS loader match functions by name only, there is no space for parameter types. The types are needed to support overloading.
If you open a Visual Studio command prompt (2003 and later; for VC6 open a command prompt and run C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat) and run dumpbin /exports on your DLL, you will probably see that the names start with a ? and end with @@ and a bunch of letters and @ symbols. That means they're decorated names.
To force undecorated names, the simplest thing to do is to tell the C++ compiler that you want C compatibility. You do this by adding extern "C" to the start of the function declaration.
You should also check which calling convention Oracle requires, to ensure that the stack is set up correctly for calling the function, and cleaned up correctly when it returns.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Workflow in short:
- create the procedure in vc++
- remember to export the procedure explicitly using DLLEXPORT
- build the dll
- place it in oracle_home/bin folder
- connect to oracle
- create a library XYZ pointing dll using CREATE LIBRARY statement
- create PL/SQL front end using CREATE FUNCTION and defining EXTERNAL LIBRARY XYZ
For more information refer to Oracle Database Platform Guide
Hope this helps,
Mika
|
|
|
|
|
I have problems on quering or better numerating all items from a specified table.
Here are my tables (Third normal form):
MailTable: Id, Created, Subject
AddressTable: Id, Name
SenderTable: MailTableId, AddressTableId
RecipientTable: MailTableId, AddressTableId, State
Now i want to make a query to numerate alle senders and recipients for one mail.
My query:
select m.Id, m.Created, m.Subject, sender.Name, recipient.Name
from MailTable as m
join SenderTable as s on s.MailTableId = m.Id
join AddressTable as sender on sender.Id = s.AddressTableId
join RecipientTable as r on s.MailTableId = m.Id
join AddressTable as recipient on recipient.Id = r.AddressTableId
The result:
1 | 2008-01-01 | Test | sender1@domain.tld | recipient1@domain.tld
1 | 2008-01-01 | Test | sender1@domain.tld | recipient2@domain.tld
2 | 2008-01-02 | Test | sender3@domain.tld | recipient3@domain.tld
etc.
My target:
1 | 2008-01-01 | Test | sender1@domain.tld | recipient1@domain.tld,recipient2@domain.tld
2 | 2008-01-02 | Test | sender3@domain.tld | recipient3@domain.tld
How do I achive this, whithout using time-consuming queries?
The bad way is to lookup for every mail all recipients, but this is not the best way!
Should I compare all records and extract my desired information?
Please Help me. Thanks!
modified on Tuesday, July 22, 2008 5:09 AM
|
|
|
|
|
shouteye wrote: whithout using time-consuming queries?
You can't
You are attempting to concat multiple records into 1, it will take at least 2 queries to achieve this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you!
It's a major problem, or my database design?
I've decided to use this but limiting to 100 records
select top(100) m.Id, m.Created, m.Subject,
(
SELECT ai.Name + ';' AS [text()]
FROM SenderTable as s
JOIN AddressTable AS at ON at.Id = s.AddressTableId
WHERE s.MailTableId = m.Id
FOR XML PATH('')
)
as senders,
(
SELECT ai.Name + ';' AS [text()]
FROM RecipientTable as r
JOIN AddressTable AS ai ON ai.Id = r.AddressTableId
WHERE r.MailTableId = m.Id
FOR XML PATH('')
)
AS recipients
FROM MailTable AS m
Is this method better as using cursors?
modified on Tuesday, July 22, 2008 8:24 AM
|
|
|
|
|
( You are using SQL2005, right? )
Try this:
;WITH RecipientsByMail (MailId, RecipientList) AS (
select mx.Id AS MailId ,
( select AddressTable.Name+','
from MailTable
join RecipientTable on RecipientTable.MailTableId = MailTable.Id
join AddressTable on AddressTable.Id = RecipientTable.AddressTableId
WHERE MailTable.Id = mx.Id
FOR XML PATH('')
) AS RecipientList
from MailTable as mx
)
select m.Id, m.Created, m.Subject, sender.Name, r.RecipientList
from MailTable as m
join SenderTable as s on s.MailTableId = m.Id
join AddressTable as sender on sender.Id = s.AddressTableId
join RecipientsByMail as r on r.MailId = m.Id ;
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
Cute - you may be able to drop the xml, I often concat fields into CSV strings as variables, I had not thought of using a subselect. I will have to play with htis in the morning.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I wonder why everyone runs away from XML...
Let me know if you find a more elegant way.
Maybe you have also time to run some performance tests
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
I don't object to xml - just the removal/simplification of any script.
I ran across an article using XML to pass recordsets into a function - what an excellent use of a technology. So for mae at least it is whatever does the job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Nope - the idea I had didn't work, the only other way I could get at this was to use a function which is even uglier!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hii..i have sqldatabase from which the data is being displayed in gridview fields and i am performing edit delete operations using the link buttons.and finally i want to dispaly the record of a single row in color format but i am unable to do so.and gridview fields are boun ddata fields.plz help me out.
santosh
|
|
|
|
|
look into the oncellformat event. There are a number of articles here about formatting cells in a gridview.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
HI Frens,
Am using a user defined function which returns a Table.Meanwhile in the function am checking the condition with 2 if loops and inserting the error in to another tables table1 and table2, but after satisfying these 2 conditions, i will get final output table3,
as of now am getting only table1 irresepective of conditions status(Pass/Fail)
Is there any suggestable scenario?
Have a Nice Day Dudes
|
|
|
|
|
Fairly obvious that there is an error in your code, and as I'm telepathic I can tell you that you have not inserted the error records into your return table.
Think about the question you are asking, how the bloody hell is anyone going to be able to help with the information you have supplied!.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi My Friends
When We Backup a Database We just Backup From Tables
How Do I Move Stored Procedures And Views When Backup database With Sqlserver?
|
|
|
|
|
Hi,
If you are using Management Studio for SQL 2005 then you can navigate to the Database->Programming
-> Storage Procedures, and in the object explorer details page, select all the procedures right click and select "Script Stored Procedure As" -> Create To -> New Query Window (or File if you'd like). This will back up your stored procedures.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
thanks for your help
is there any way to do this with out wizard ?
i want to do this in my program that write with c# and sqlserver
|
|
|
|
|
i need to layout a giant database
however, i dont have visio. are there any free and easy flow chart programs?
it is just database layout and nothing more complicated...but paint really is not helping me much with this.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
Moved on Monday, July 21, 2008 10:26 PM
|
|
|
|
|
What kind of database is it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
relational. huge bastard.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
I meant, MSSQL, Oracle, MySQL, which one?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
you know i thought you meant that...but i was trying to get the smell out of the kitchen from letting my cooking attrocities hang too long.
MSSQL
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|