Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In VB I could use a UDL file to redirect an SQL Connection.

 

Is there an equivalent in vb.net ?

 

Or should I use an XML file like I would an ini file to feed in the connection string nformation.

  • *Experts*
Posted

I think UDL is a Datalink file, to replace the DSN for ODBC connections, right? If so, you should still be able to open the UDL (just a guess) by specifying it in the connection string when using the OleDB provider...? Just a guess and I don't have a datalink file to test with :)

 

You could, of course, use a custom XML file to store whatever you need to know about the connection string. You'd have to manually extract the elements you need and piece them together into a connection string. This would be similar to an INI file but would be a little more self-documenting and could, with some extra effort, also be easily validated with XSL (if you so-desired).

 

-nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

Ended up using an XML file and XML code in the program to read it.

 

I am seen examples of UDL's being used in OLE connection but not in SQL specific connnections.

 

I tried it but the connection string method did not recognize FILE NAME= parameter.

 

The 100 MS examples are proving to be very helpful. There is a lot more to learn in each one other than the named example...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...