Connection to DB2 - passwords

I'm new in querying the DB2. Am trying to run a select query in DB2 and get the results in a datatable using a C# Windows Application.
Below are the issues which am facing.
I used IBM.Data.DB2.dll as reference but am still getting errors for the classes like DB2Connection, DB2Adapter, etc.
Want to fetch the password from registry for a particular user ID. Am completely unaware of how that can be done. I want this to mention in the Connection string.
Kindly help me on these queries..
Thanks in Advance.!!

Take a look at the official C# Samples for DB2.
Take a look at for instance this example for managing Windows registry using C#.enter link description here

Related

WSO2 Identity Server - Adding Service Provider using SQL

WSO2 Identity Server 5.0.0
I am wondering what the full path of SQL queries would be if i wanted to create and update Service providers via SQL queries. It's more than adding to the SP_APP table as a newly inserted entry by that means doesn't show in the UI. I was looking through the identity-core code and got a little lost, since it seems to abstract out some intricate registry stuff.
Anyway, I'd love to know how I could navigate the database to look at stuff by these means.
I would suggest moving your WSO2 IS completely onto SQL Server. You can then see all the tables and scripts that are run against it (using something like QueryProfiler). To do this, follow the instructions: https://docs.wso2.com/display/ML111/Setting+up+Microsoft+SQL.
Note that at the end of the document you must run two scripts (not just the one they show):
<PRODUCT_HOME>/dbscripts/mssql.sql
<PRODUCT_HOME>/dbscripts/identity/mssql.sql
I have to admit that the documentation on WSO2 IS is not very good or complete, but they have been good at answering questions. SQL Server was hard to set up as some of the steps were old (as you see they reference SQL Server 2005), but if you know your way around SQL Server pretty well, you can figure out the minor things. The largest issue was the second .sql script that needed to be run.
That should set you up well enough to see what is being called when set up Service Providers, or anything else that goes into the database.

Cloud bees, create db's tables

After I've done developing my web site using Hibernate and Struts2, now I want to put it on Cloudbees hoster, the problem is that I don't know how to create my data base's tables?!!
I used the method shown in this video to create my tables: http://vimeo.com/33445098 But it doesn't work!!
It shows how to connect to my server by using MySQL WorkBench, when I created new Server instance the connection couldn't be established, although I used the appropriate informations.
Thank very much :)
After days of looking around on the web I found this, it's very useful
http://www.youtube.com/watch?v=oWE6s_FQBwA

SQL Server - Checkout system for database objects?

I was wondering if anyone knows any 3rd party tools or existing functionality in SQL Server 2008 so that when someone is working on a table or procedure, it is locked out to that individual. I have searched the net extensively and can't seem to find anything relating to this. We are facing a problem where two people may be working on the same stored procedures and whoever executes last gets the code change! This kind of functionality would come in handy. I think that a lock or check in/check out system would be benefit a project, any ideas?
I am already hooked up to Redgate source control, which does not provide this functionality.
Thanks
Try and have a look at this SO discussion: How do I version my SQL Server database in SVN?
It might not lock things like you want, but it would help to ensure code is recoverable. You could also consider using DDL triggers as some kind of a checking mechanism.
you could try this: http://www.apexsql.com/sql_tools_version.aspx
Alternatively, try this: http://www.red-gate.com/products/sql-development/sql-source-control/entrypage/5-minutes?utm_source=google&utm_medium=cpc&utm_content=unmet_need&utm_campaign=sqlsourcecontrol&gclid=CK_qsPC5prUCFe7MtAodzC8ACA

Is a pay-version of LINQPad required to use custom assemblies?

I just ran into LINQPad today and was trying to add a connection using my own LINQ to SQL assembly. I've specified the path, the full name, the server, and the auth method but the OK button to save it never enables. Either there is something wrong with my DLL or perhaps this feature is only available in one of the paid editions?
I'm an idiot and didn't specify the database. I could vote to delete this question but maybe someone else will have a similar moment and this will help them out.

FluentNHibernate: Getting the Examples.FirstProject to work

Im trying to get the most basic of examples to run in FnH. I started with the Examples.FirstProject. However, I did not use the SQL lite configuration. Instead, I set the configuration to SQL2005 and created the tables as was diagramed in the example.
When stepping through the code, there appears to be no problems when creating the session factory. I do receive an error however when the code reaches the "transaction.commit" line. The error reads:
Could not insert collection: [Examples.FirstProject.Entities.Store.Products#5][SQL:SQL not available]
Im wondering if there was an issue with the way the tables were created in SQL Server. The IDs were "int" type and the names and such were "varchar(50)." I set the PK of Store, Product, and Employee to its respective ID field. I also made the ID increment automatically by 1 (IdentitySpecification column property in SQL Server). StoreProduct is the many-to-many and is also there per the diagram.
Any help would be appreciated. Thanks.
Have you modified the sample in any way other than changing the database provide? Have you been able to save any entities from the sample (ie if you remove the Products code and just save the Store)?
I developed this sample against SQLExpress, so I would imagine there wouldn't be any incompatibilities with SQL 2005.
Also, this question would probably be better be suited to the Fluent NHibernate mailing list, as Stack Overflow isn't great for these kind-of investigatory postings.
Thank you James. I'll look at using Fluent NHibernate mailing list. As a solution to my issue, I did simplify the example a bit and found that rebuilding the tables helped. In the previous attempt I built the tables in the Database diagram tool. That is where I think something was a little off. Just now I rebuilt them using the menus and still made the foreign key connections with the Database Diagram section. Worked like a charm. Thanks again and keep up the good work with FnH.
First thing to check: Are you sure that you have really created a correct table in SQL server, and that the schema is correct? You can verify this by using SQL Express management studio to view the sql database.