Showing posts with label cast. Show all posts
Showing posts with label cast. Show all posts

Thursday, March 29, 2012

Office Automation - Powerpoint in VB.Net

Hi

I tried to do the Powerpoint presentation using VB.Net 2.0. I got error while creating the object of the Powerpoint.Application

Unable to cast COM object of type 'PowerPoint.ApplicationClass' to interface type 'PowerPoint._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).


Can any one tell me the solution for this error.?

Ganesh.

Hi Ganesh,

The error indicates that the PowerPoint.ApplicationClass was not registered on the running machine properly. A COM class needs to be registered in the registery to make it identified. The register process is done at the installation phase of Office.

So you can try to repair the installation of PowerPoint or make sure it is installed properly.

Further more, in an ASP.NET application, server side automation is not supported. Here is a KB article about this.

http://support.microsoft.com/kb/257757/en-us

Hope this helps.

Thursday, March 22, 2012

OleDbConnection via MS REMOTE -> "Specified cast is not valid. "

Hi everyone,
Im using the following conn string in asp.net 1.1 using vb.net:
Dim conn As New OleDbConnection("Provider=MS Remote;Remote
Server=http://myintranetserver/; Remote Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;uid=;Password=;")
Whenever I execute rs.executereader,
I will receive "Specified cast is not valid. "
There's nothing wrong with the sql statements.
if i change my conn string to:
' Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;User Id=admin;Password=;")
Then the script will have no problem!
Pls advise.,
Thanksif the server is on the same network - instead of the Http://, use a UNC
format in the path, like:
\\Servername\yourpath\your.mdb
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com
"user" <mylinuxjourney@.gmail.com> wrote in message
news:1181215727.462820.245670@.g37g2000prf.googlegroups.com...
> Hi everyone,
> Im using the following conn string in asp.net 1.1 using vb.net:
> Dim conn As New OleDbConnection("Provider=MS Remote;Remote
> Server=http://myintranetserver/; Remote Provider=Microsoft.Jet.OLEDB.
> 4.0;Data Source=c:\pass\be\quiz.mdb;uid=;Password=;")
> Whenever I execute rs.executereader,
> I will receive "Specified cast is not valid. "
> There's nothing wrong with the sql statements.
> if i change my conn string to:
> ' Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.
> 4.0;Data Source=c:\pass\be\quiz.mdb;User Id=admin;Password=;")
> Then the script will have no problem!
> Pls advise.,
> Thanks
>
THanks for the reply.
Do u mind elaborate further? Or post the full conn string?
Thanks
On Jun 7, 10:44 pm, "David Wier" <davidw...@.davidwier.nospam.com>
wrote:
> if the server is on the same network - instead of the Http://, use a UNC
> format in the path, like:
> \\Servername\yourpath\your.mdb
> --
> David Wier
> MVP/ASPInsiderhttp://aspnet101.comhttp://iWritePro.com
> "user" <mylinuxjour...@.gmail.com> wrote in message
> news:1181215727.462820.245670@.g37g2000prf.googlegroups.com...
>
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -

OleDbConnection via MS REMOTE -> "Specified cast is not valid. "

Hi everyone,

Im using the following conn string in asp.net 1.1 using vb.net:

Dim conn As New OleDbConnection("Provider=MS Remote;Remote
Server=http://myintranetserver/; Remote Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;uid=;Password=;")

Whenever I execute rs.executereader,

I will receive "Specified cast is not valid. "

There's nothing wrong with the sql statements.

if i change my conn string to:
' Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;User Id=admin;Password=;")

Then the script will have no problem!

Pls advise.,

Thanksif the server is on the same network - instead of the Http://, use a UNC
format in the path, like:
\\Servername\yourpath\your.mdb

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com
"user" <mylinuxjourney@.gmail.comwrote in message
news:1181215727.462820.245670@.g37g2000prf.googlegr oups.com...

Quote:

Originally Posted by

Hi everyone,
>
Im using the following conn string in asp.net 1.1 using vb.net:
>
Dim conn As New OleDbConnection("Provider=MS Remote;Remote
Server=http://myintranetserver/; Remote Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;uid=;Password=;")
>
Whenever I execute rs.executereader,
>
I will receive "Specified cast is not valid. "
>
There's nothing wrong with the sql statements.
>
if i change my conn string to:
' Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;User Id=admin;Password=;")
>
Then the script will have no problem!
>
Pls advise.,
>
Thanks
>


THanks for the reply.

Do u mind elaborate further? Or post the full conn string?
Thanks

On Jun 7, 10:44 pm, "David Wier" <davidw...@.davidwier.nospam.com>
wrote:

Quote:

Originally Posted by

if the server is on the same network - instead of the Http://, use a UNC
format in the path, like:
\\Servername\yourpath\your.mdb
>
--
David Wier
MVP/ASPInsiderhttp://aspnet101.comhttp://iWritePro.com
>
"user" <mylinuxjour...@.gmail.comwrote in message
>
news:1181215727.462820.245670@.g37g2000prf.googlegr oups.com...
>
>
>

Quote:

Originally Posted by

Hi everyone,


>

Quote:

Originally Posted by

Im using the following conn string in asp.net 1.1 using vb.net:


>

Quote:

Originally Posted by

Dim conn As New OleDbConnection("Provider=MS Remote;Remote
Server=http://myintranetserver/;Remote Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;uid=;Password=;")


>

Quote:

Originally Posted by

Whenever I execute rs.executereader,


>

Quote:

Originally Posted by

I will receive "Specified cast is not valid. "


>

Quote:

Originally Posted by

There's nothing wrong with the sql statements.


>

Quote:

Originally Posted by

if i change my conn string to:
' Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.
4.0;Data Source=c:\pass\be\quiz.mdb;User Id=admin;Password=;")


>

Quote:

Originally Posted by

Then the script will have no problem!


>

Quote:

Originally Posted by

Pls advise.,


>

Quote:

Originally Posted by

Thanks- Hide quoted text -


>
- Show quoted text -