<newbie> ODBC issues!

J

Jeff

hi

asp.net 2.0

i've used connectionstrings like this one for my webproject:
connectionString="Server=Pdc1;Database=Testing;Integrated
Security=false;User ID=tester;Pwd=hardtoguesspwd;" />

But now I need to change to using odbc as the webhosting company only
support odbc. So from my understanding I need to change my
connectionstring - specify what odbc profile to use.

In addition I wonder if I need to change my code for accessing the database:
public List<Car> GetCars()
{
using (SqlConnection cn = new SqlConnection(this.ConnectionString))
{
SqlCommand cmd = new SqlCommand("test_spGetCars", cn);
cmd.CommandType = CommandType.StoredProcedure;
cn.Open();
return GetCarCollectionFromReader(cmd.ExecuteReader());
}
}
(does that code looks okay for being used together with odbc?)

any suggestions?
 
J

Jeff

They support DSN-less connections also, whatever that means

the ISP is servetheworld.no
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top