473,587 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=M S Remote;Remote
Server=http://myintranetserve r/; Remote Provider=Micros oft.Jet.OLEDB.
4.0;Data Source=c:\pass\ be\quiz.mdb;uid =;Password=;")

Whenever I execute rs.executereade r,

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=Micr osoft.Jet.OLEDB .
4.0;Data Source=c:\pass\ be\quiz.mdb;Use r Id=admin;Passwo rd=;")

Then the script will have no problem!

Pls advise.,

Thanks

Jun 7 '07 #1
2 3244
if the server is on the same network - instead of the Http://, use a UNC
format in the path, like:
\\Servername\yo urpath\your.mdb

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://iWritePro.com

"user" <my************ @gmail.comwrote in message
news:11******** **************@ g37g2000prf.goo glegroups.com.. .
Hi everyone,

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

Dim conn As New OleDbConnection ("Provider=M S Remote;Remote
Server=http://myintranetserve r/; Remote Provider=Micros oft.Jet.OLEDB.
4.0;Data Source=c:\pass\ be\quiz.mdb;uid =;Password=;")

Whenever I execute rs.executereade r,

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=Micr osoft.Jet.OLEDB .
4.0;Data Source=c:\pass\ be\quiz.mdb;Use r Id=admin;Passwo rd=;")

Then the script will have no problem!

Pls advise.,

Thanks

Jun 7 '07 #2
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...@davi dwier.nospam.co m>
wrote:
if the server is on the same network - instead of the Http://, use a UNC
format in the path, like:
\\Servername\yo urpath\your.mdb

--
David Wier
MVP/ASPInsiderhttp://aspnet101.comht tp://iWritePro.com

"user" <mylinuxjour... @gmail.comwrote in message

news:11******** **************@ g37g2000prf.goo glegroups.com.. .
Hi everyone,
Im using the following conn string in asp.net 1.1 using vb.net:
Dim conn As New OleDbConnection ("Provider=M S Remote;Remote
Server=http://myintranetserve r/;Remote Provider=Micros oft.Jet.OLEDB.
4.0;Data Source=c:\pass\ be\quiz.mdb;uid =;Password=;")
Whenever I execute rs.executereade r,
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=Micr osoft.Jet.OLEDB .
4.0;Data Source=c:\pass\ be\quiz.mdb;Use r Id=admin;Passwo rd=;")
Then the script will have no problem!
Pls advise.,
Thanks- Hide quoted text -

- Show quoted text -

Jun 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1888
by: Brent | last post by:
I maintain a Sql Server database application whose forms are compiled in a .dll and kept in a remote web folder. The main .exe looks to the web folder to see if this .dll exists. If so, then it compares the ..dll with the cache copy. If the cache copy is older then it downloads a new copy. If the .dll is not present, it throws an error. In...
0
1980
by: Joerg Ammann | last post by:
hello, we are using: - DB2 UDB V 8.1 FP-6 on LINUX as (local) federated DB - DB2 UDB V 7.2 on AIX as datasource we try to move part of an application (most of the tables) von AIX to LINUX and acess a few remaining tables (on AIX) via the "federated DB" feature.
1
1912
by: Nuno Magalhaes | last post by:
This code gives me the runtime error "Specified cast is not valid": MyTcpClient ClientTcp=(MyTcpClient)ListenerTcp.AcceptTcpClient(); MyTcpClient is a class that inherits from TcpClient. Why can't I do this? Is it possible to get the remote endpoint without have to go to the underlying socket? I don't want to mess with sockets and I just...
3
1788
by: Ludvig | last post by:
This Exception is executed when using SQLConnection. OleDbConnection connects fine. System.EnterpriseServices.Platform.Initialize() +503 System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11 System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797...
15
2236
by: David | last post by:
Hi, I have built a web application that will be a very high profile application. We had tested it, demonstrated it and shown that it all works. On a dress rehearsal run through, it failed spectacularly. I was so embarrassed and felt like killing the person that made it fail. However, when it goes live, IT MUST NOT FAIL. The system has...
0
4870
by: RSH | last post by:
I am having a bit of trouble filling a datatable with a query. I'm getting the error message: System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles) at...
2
1379
by: Drygast | last post by:
I'm newbie to programming and it seems I'm stuck on this problem.... the code: _____________________________ Private Sub fetchOrder() If txtOrdernummer.Text <> "" Then Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\dummy.mdb"
2
12316
by: Glen Conway | last post by:
Hi, I am trying to get the contents of a file in a hidden share on a remote server, something like '\\server.domain.com\c$\program files\application\document.xml'. When I try any of the standard streamreader, textreader or file classes I get an access denied error message (which I expect). If I go Start | Run and type this in, I get...
21
1906
by: John Howard | last post by:
Making the following call to a local MSAccess database works fine: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Dim intRows As Integer Dim strSQL As String Dim ds As New DataSet ' Create connection Dim cn As New OleDbConnection With cn .connectionstring = "provider=Microsoft.Jet.OLEDB.4.0;" & _
1
2893
by: remya1000 | last post by:
i'm tring to start a calculator in a remote machine from my system. and the codes i tried is this. Module Module1 Sub Main() Dim retValue As String retValue = RunCommand("calc.exe", "MachineName", "MachineName\UserID", "Password") Console.WriteLine(retValue) End Sub Function RunCommand(ByVal...
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.