Showing posts with label vbnet. Show all posts
Showing posts with label vbnet. Show all posts

Monday, March 26, 2012

How to connect to remote MSDE database using VB.NET

Greetings
I have a VB.NET application that works great with a local MSDE database. But, when I try to revise my connection string to point to a remote MSDE server and database, it fails. The MSDE Server Manager can pick up the remote server and tell me its runni
ng, but when I try to register it using SQL Server, or use a DSN to connect to it, I get a "SQL Server does not exist or access denied. ConnectionOpen(Connect())" My connection string is:
Provider=SQLOLEDB.1;Server=DSS\VSDOTNET;Database=d atabase;User ID=sa;Password = xxxxx;Integrated Security=SSPI
Any help will be appreciated. Thanks...
- Tim B.
hi Tim
"Tim Balderramos" <pacmantab@.hotmail.com> ha scritto nel messaggio
news:28F08CF8-86CF-4C04-9E5A-900296EC78A7@.microsoft.com...
> Greetings
> I have a VB.NET application that works great with a local MSDE database.
But, when I try
>to revise my connection string to point to a remote MSDE server and
database, it fails. The
>MSDE Server Manager can pick up the remote server and tell me its running,
but when I try
>to register it using SQL Server, or use a DSN to connect to it, I get a
"SQL Server does not
>exist or access denied. ConnectionOpen(Connect())" My connection string
is:
> Provider=SQLOLEDB.1;Server=DSS\VSDOTNET;Database=d atabase;User
>ID=sa;Password = xxxxx;Integrated Security=SSPI
the most frequent causes of that kind of error are reported in
http://support.microsoft.com/default...06&Product=sql
KB article...
please verify the remote MSDE instance has enabled networkprotocols too,
using the remote Server Network Utilityes (svrnecn.exe)
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.7.0 - DbaMgr ver 0.53.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I think that does it. Here is what my co-worker did:
During MSDE setup, use SECURITYMODE=SQL
Then use SVRNETCN.exe and enable TCP/IP as a network library. I did this on
both machines, but you may not need to do it for both (wasn't sure, but didn't
think it mattered).
Here's the connection string that was working -
Provider=SQLOLEDB;Data Source=wrctest;user id=sa;password=wrctest;Initial
Catalog=winthrop;Net=dbmssocn;Auto Translate=True;Persist Security
Info=False;Use Encryption for Data=False

Friday, March 23, 2012

How to connect MS AS 2005 with AMO in vb.net

Hi All,

I am working on MSAS 2005 and am new to this one but i worked on AS 2000(DSO).I just want to connect to the MS AS 2005 Server from vb.net by using AMO(Analysis Management Object).

It is really very urgent.Help needed.

Regards

vishu

Hi,

MSDN has some great examples over here Those should get you started..

C.
|||

I tried with that.But i am getting below error.

connection cannot be made.Ensure that the server is running.

What could be the problem i could not understand.I checked in my services all the services are running and i able to connect from MS Management Studio to Analysis services.I am giving my Machine Name(ServerName)/SQL2005.

But when i am trying to connect from VB.Net am getting error.

Please help on this.

Regards

vishu

|||It may help to paste your code.

C
|||

Hi

I am Placing that part of code.Please check it and let me know.

using System.AnalysisServices

//for strStringConnection am passing Data Source=ServerName

static Server ServerConnect( String strStringConnection)

{

string methodCaption = "ServerConnect method";

Server svr = new Server();

try

{

svr.Connect(strStringConnection);

}

#region ErrorHandling

catch (AmoException e)

{

MessageBox.Show( "AMO exception " + e.ToString());

svr = null;

}

catch (Exception e)

{

MessageBox.Show("General exception " + e.ToString());

svr = null;

}

#endregion

return svr;

}

Is there any wrong with the code. Please advise the same.

Regards,

vishu

|||Looks right to me, except i tag 'Provider=msolap' on the end of my connection string, like:

'Data Source=ServerName;Provider=msolap'

But i tried it without the provider, and it worked also. So, i'm not sure i can be of any help.

C
|||

Thanks.It is working now.

I need some info like can we connect Ms As 2000 and Ms As 2005 from any one like either with DSO or AMO.

it this possible or else we have to mainatin separate things for above servers.

help me on this.

|||

No you cannot connect to both AS 2000 and 2005 using one API

AMO = AS 2005

DSO = AS 2000

If your app needs to manage both you will need to use both API's. You do not need the "provider=msolap" in the connect method, you should only need to pass in the server name eg. svr.Connect("localhost")

|||

Hi

Thanks,I am sending my current environment where i am working OS:win 2003 server and MS AS 2005 and .net 2.0.In my previous environment win 2000 and MS As 2000 by using DSO and ADOMD i worked there is no issues in that.My client wants both has to work.becaz they are migrating servers one by one.coming to the code In this i had written some Webmethods through which am managing Ms As 2000 with DSO(connecting to MSAS and managing).So now they are going to change the servers in to MS As 2005 and they need the same kind of functionality should work from win 2003 and MS As 2005 & .net 2.0.For MDX purpose we used ADOMD.

This is some wht migration work.

Is there any chances to communicate and maintain the both the calls and how help needed.

|||You will have to develop 2 branches of code. Keep the existing one that works with AS2000 and develop a new one for AS2005. You can use code similar to that which I suggested here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1523691&SiteID=1 to detect which version you are talking to.|||

Thanks Darren.

It is helped me to go further.

|||

Hi Darren Gosbell

I am working on some migration project.it is from AS 2000 to AS 2005.

I have to create a role in AS 2005.Is this one is similer functionality like in AS 2000.

Plz let me know.

I am using AMO for making connection i can able to connect and now i have to create a role,In my previous development we used to create a role in database then after in cube with the help of DSO.Could you please help on this.

if possible if you have any sample to create a role in AS 2005 with AMO please send to me.

Thanks in Advance.

vishu

sql