Need urgent C# help

CorNokZ

Currently a stay at home dad
Joined
Jan 24, 2004
Messages
19,779
Hey guys

I am not great at programming, at all, and I am totally new to this sort of thing. I made a very very simple program that can store different data in a database, search the database and delete items in the database. It worked fine when I left my school, but when I came home and got a connection to my school's server and opened up the files in my Visual C# 2010, which is the same that I use at campus, I got these errors:

Invalid URI: The hostname could not be parsed.

System.ArguementNullException was thrown on "": Key cannot be null.
Parameter name: key

What am I doing wrong? :(
 

ST^

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,351
Post your code? ¬_¬

It is probably the part that is trying to connect to the database that is failing. Doesn't it highlight the line where the compiler failed?
 

CorNokZ

Currently a stay at home dad
Joined
Jan 24, 2004
Messages
19,779
Line 1 coloumn 1 in my .xaml file..

<-- Error here --><Window x:Class="WpfApplication1.MainWindow"
 

CorNokZ

Currently a stay at home dad
Joined
Jan 24, 2004
Messages
19,779
Think you are right about my database..

this is how my code for my connection object looks like:

OleDbConnection cn = new OleDbConnection();
cn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\IEUSR2\Users$\080705\MyIHKWebsite\WriteAccess\Auto_data.mdb;User Id=;Password=;";

But the source must be wrong, since I am accessing the server from my home computer and not from campus, right?
 

ST^

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,351
Well it said the hostname can't be parsed, not that it couldn't connect, which sounds weird to me. But yeah, \\IEUSR2 refers to a network location that you may not have access to from where you are...
 

Aoami

I am a FH squatter
Joined
Dec 22, 2003
Messages
11,223
vpn to your school network if you can, should sort it. had loads of these probs when coding uni work at home.
 

GimmlyThe3rd

Banned
Joined
Aug 24, 2008
Messages
744
Post your source but leave out the password? thats a dir not a hostname, so unless you mapped the school network drive it won't work ....
 

TdC

Trem's hunky sex love muffin
Joined
Dec 20, 2003
Messages
30,804
you're not working out of a drop-box are you Anders? I had a shit tonne of grief using Eclipse until I learned to copy my work from the db to a local staging area :/
 

Users who are viewing this thread

Top Bottom