program will not run on another pc


C

cj2

I just wrote a 2008 program with one button to provide an easy way to
set a flag in an old foxpro table. I compile it and put the exe on a
network drive. I made an icon on my desktop and ran the program and it
works. I then put the icon on another pc and tried to run the program
and I got:

Unhandled exception has occurred in your application. If you click....

ERROR [IM001][Microsoft][ODBC Driver Manager] Driver does not support
this function

Here is my code:

Imports System.Data.OleDb
Imports System.Data.Odbc

Public Class Form1
Dim myOdbcConnection As New OdbcConnection
Dim myOdbcCommand As New OdbcCommand

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
myOdbcConnection.ConnectionString = "Driver={Microsoft Visual
FoxPro
Driver};SourceType=DBF;SourceDB=c:\;Exclusive=No;Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO;"
myOdbcCommand.Connection = myOdbcConnection
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
myOdbcCommand.CommandText = "update i:\webvalidate\systemcfg
set Flag = '0'"
myOdbcConnection.Open()
myOdbcCommand.ExecuteNonQuery()
myOdbcConnection.Close()
MessageBox.Show("Done!")
End Sub
End Class

This just so happens to be my first 2008 program to leave my pc. I know
in order for my 2003 program to run on other pcs I had to go into .net
wizards and set local intranet to fulltrust. In 2005 I had to do caspol
-m -cg 1.2 fulltrust. I'm wondering if this problem is because I have
to do something for 2008 it has something to do with is the first.
What's going on?
 
Ad

Advertisements

C

cj2

This turned out to be that I needed to load some newer foxpro odbc
drivers on that pc. So it's fixed. I thought they were already there.

I'm still wondering however if I am going to run into a similar
situation with 2008 that I had with 2005 and 2003? If so how would I
fix it?
 
Z

Zhi-xin Ye

Dear cj2,

The Visual Studio 2008 uses the .NET Framework 3.5, you can still use the
Caspol tool to grant FullTrust permission for your application. But if you
install the .NET Framework 3.5 SP1 beta , applications run from a network
share will receive a grant set of FullTrust by default.

You can refer to this blog for more information:

FullTrust on the LocalIntranet
http://blogs.msdn.com/shawnfa/archive/2008/05/12/fulltrust-on-the-localintra
net.aspx

And the Microsoft .NET Framework 3.5 Service pack 1 Beta is available at:
http://www.microsoft.com/downloads/details.aspx?FamilyId=8C36ACA4-E947-4760-
9B05-93CAC04C6F87&displaylang=en

Have a good day!

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

cj2

True, I actually hadn't thought of that but then again 2008 uses 3.5 by
default I think. Anyway, Zhi-xin Ye pointed out that 3.5 doesn't need
any changes. Thanks.
If you are talking about caspol, IMO no because the 2.0 CLR is still used so
what you have done previoulsy using caspol to allow your .NET 2.0
application running will still apply to applications created using VS 2008.

[cut]
I'm still wondering however if I am going to run into a similar situation
with 2008 that I had with 2005 and 2003? If so how would I fix it?
[cut]
This just so happens to be my first 2008 program to leave my pc. I know
in order for my 2003 program to run on other pcs I had to go into .net
wizards and set local intranet to fulltrust. In 2005 I had to do
caspol -m -cg 1.2 fulltrust. I'm wondering if this problem is because I
have to do something for 2008 it has something to do with is the first.
What's going on?
 
C

cj2

Ok but how do you explain Zhi-xin Ye's link? It says in 3.5 there is no
need to do the caspol thing to give local intranet fulltrust.
3.5 and 3.0 are just additional assemblies. A 3.0 or 3.5 application still
runs using the 2.0 runtime what applies to the 2.0 runtime is still valid...



cj2 said:
True, I actually hadn't thought of that but then again 2008 uses 3.5 by
default I think. Anyway, Zhi-xin Ye pointed out that 3.5 doesn't need any
changes. Thanks.
If you are talking about caspol, IMO no because the 2.0 CLR is still used
so what you have done previoulsy using caspol to allow your .NET 2.0
application running will still apply to applications created using VS
2008.

[cut]

I'm still wondering however if I am going to run into a similar
situation with 2008 that I had with 2005 and 2003? If so how would I
fix it?

[cut]

This just so happens to be my first 2008 program to leave my pc. I
know in order for my 2003 program to run on other pcs I had to go into
.net wizards and set local intranet to fulltrust. In 2005 I had to do
caspol -m -cg 1.2 fulltrust. I'm wondering if this problem is because
I have to do something for 2008 it has something to do with is the
first. What's going on?
 
Ad

Advertisements

J

Jack Jackson

Do apps have to target 3.5 to see this change, or will apps that
target 2.0 also see it as long as 3.5 SP 1 Beta is installed?
 
Z

Zhi-xin Ye

Dear c2j,

There might be some misunderstanding between us. I'm sorry if I didn't
explain it well.

The .NET Framework 3.5 still uses the CLR of version 2.0, Patrice is right
on this.
So what we did for the Visual Studio 2005 to grant full trust permission
can still apply to the Visual Studio 2008, i.e. we can use Caspol tool to
do this in Visual Studio 2008.

What I mean in my last reply is that it's the .NET 3.5 sp1 beta who makes
the difference, not .NET Framework 3.5.
If you don't have that .NET 3.5 sp1 beta installed, you still need to use
the Caspol tool to grant the full trust permission.

If you have any unclear about this, please feel free to let me know.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Z

Zhi-xin Ye

C2j, dear c2j, dear c2j

I'm some misunderstanding be some misunderstanding between us. I'm some
misunderstanding between us. I'm sorry if I didn't explain it well.
There misunderstanding be some might bettween.

Right on can uses the clr of version can still trust permission 2.0,
patrice is in visual studio 2008, I.e. We did for the visual studio
2008. The visual studio 2008. The .net framework 3.5 still use caspol to
grant full to do the caspol to this. So what we can still to do this. So
what we did for this. So what we did for this. So what we did for the
visual studio 2008, I.e. We can still apply to do this right on 2.0,
patrice is right on the visual studio 2008, I.e. We can uses this right
on this. So what we did for the ..net.

Caspol trust permission. What .net 3.5 sp1 beta who makes that it's that
it's the caspol trust permission. What it's the difference, not .net 3.5
sp1 beta who makes the caspol tool trust permission. What it's the full
need to grant the .net framework 3.5. If you don't have that .net 3.5
sp1 beta who makes the .net 3.5. If you still need to grant that I mean
in my last permission. What I mean in my last permission. What .net 3.5
sp1 beta installed, you don't have the caspol tool to.

About this, plear about this, please feel free to let me know. If you
have any unclear about this, plear about this, plear about this, plear
about.

Team sincerely, zhi-xin ye microsoft managed newsgroup support team
sincerely, zhi-xin ye microsoft managed newsgroup support tea

Send suggestions about how welcomers is our #1 provided. You the support
we can send suggestions and feel free the suggestions and suggestions
and support we priority. We welcomments about how what your custome you.
Please feel free the level free to you. Please feedback directly to you
can improve to my manager know what your comers is our com. Delighting
our customers is our custome you. Please feel of service priority. We we
prove to my manager know welcomments about how we priority. We we
provide the let my manager at: (e-mail address removed) about how
welcomments about how what your #1 provideed.

No warranties, and confers no warranties, and confers no rights. This
posting is posting is posting is provided "as is" with no warranties,
and confers no warranties,
 
Z

Zhi-xin Ye

Dear cj2,

You're welcome. Thanks for using Microsoft Managed Newsgroup Service!

Have a good day!

Sincerely,
Zhi-Xin Ye
Micrososft Managed Newsgroup Support Team
========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Ad

Advertisements

Z

Zhi-xin Ye

Dear cj2,

You're welcome. Thanks for using Microsoft Managed Newsgroup Service!

Have a good day!

Sincerely,
Zhi-Xin Ye
Micrososft Managed Newsgroup Support Team
========================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Z

Zhi-xin Ye

Dear Jack,

Basically .NET 3.5 sp1 can be treated as .NET 2.0 CLR sp2, so I don't think
you need to re-target your application to 3.5 to be able to use that
feature. However, to be safe, I would suggest you download .NET 3.5 sp1
beta and test it on a virtual pc.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team
=======================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Ad

Advertisements

Z

Zhi-xin Ye

Dear Jack,

Basically .NET 3.5 sp1 can be treated as .NET 2.0 CLR sp2, so I don't think
you need to re-target your application to 3.5 to be able to use that
feature. However, to be safe, I would suggest you download .NET 3.5 sp1
beta and test it on a virtual pc.

Sincerely,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team
=======================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top