I want to create a SQL connection using DSN. Then I want to generate the DAL using Subsonic. Please can you give me some pointers on what to do?
You don't need a DSN in these days (I assume you want to abstract the connection) - you can do that with SubSonic 3 by specifying the provider right in the connection string. If you want to switch providers, just change the "providerName" attribute of the connectionString.
I'm wondering if this is for legacy issues but a DSN is entirely in your control, it seems - and I think there's a better way.
Related
Using VB.NET, I can connect to a local SQL database easily, but, trying to get more advanced graphical features, I started using SilverLight for VB.NET, and so i got this problem.
Is it possible to connect a local database, and it must be SQL, with SilverLight for VB.NET?
It must be Out Of Browser too, i'm doing a Desktop App.
If there's no really way to do it, how can i make a more beatiful system, as I don't want to make the same old windows style.
Yes, you can access a db with Silverlight. As to how, the same ways you'd do it without SL really. Personally I use EntityFramework, and create a model from my database. Then I operate on that model using the context generated.
It doesn't matter if the db is local or remote, the methods are the same - they are just connection strings after all.
I have a new server with the same Classic ASP code connecting to same SQL Server 2000 database with the same connection string yet it seems to be pulling data out of the database differently now. Specifically there is a custom encryption function which creates special characters (non-ASCII) and stores them in a VARCHAR field. (This is legacy code.) Since nothing has changed except the web server it has been hard to diagnose this problem.
Is there some setting that would control the database driver which would allow this data to come out of the database? It seems the character set is not treated the same with the new server as it was with the old server. Is there something I can change in the ODBC driver settings?
The server version change is from IIS 6 to IIS 7.5. The new server obviously also has new ODBC driver versions.
Any help is appreciated?
I suspect something to do with Locale rather than anything else. However I don't understand Locale. :-(
If it is a stored proc, a quick-fix might be to change the data type on the DB parameter/column to NVARCHAR. With ASP it will be unicode BSTR values in the application anyway, so moving the conversion into the database may make it easier to control, if necessary by specifying a collation to use for the conversion.
If you have the ASP code you could also edit the select to say cast(password as nvarchar(50)) as password or whatever to achieve the same result.
I use vb.net and windows form and sqlserver
I added Data Source(Microsoft SQL Server (SqlClient)) to my project. and now I need to change it to ODBC Data Source .
How Can I do That?
thanks
See these resources - you cannot simply change your SqlClient/SqlCOnnection - you need to use OdbcConnection instead:
Connecting to an ODBC Data Source Using ADO.NET
ADO.NET ODBC connection in VB.NET
ODBC is a technology several generations older than ADO.NET/SqlClient - why do you want to "downgrade" back into the dark ages?? What are you trying to achieve that you cannot do using SqlClient?? If you really must connect to a multitude of different datasources, I would strongly recommend using / investigating OleDB instead of ODBC. ODBC is really quite old, and e.g. doesn't have any 64-bit capable drivers.... OleDB does!
See the Wikipedia article on OleDB, and view impressive lists of OleDB data providers here and here for some insights.
I am wondering what I should use to connect to TD via VB.NET. Whether or not I should use ODBC, etc.... My server is TDDEV, database BCPM_DDBO. Also, passwords are changed every so often by DB Admin so I would not want to hard code a password in the connection string. I know that ODBC will prompt for user/pass. Is this the route to go? Thanks so much!
The Teradata .Net provider is faster at retrieving a large number of rows. (Teradata Developer Exchange)
However, there are some caveats when using it over the ODBC driver (at least with SQL Assistant):
Global Temporary Tables are not distinguished from regular tables
The data type for columns/parameters will be the .Net data type and not the real Teradata type
A WITH (summary) clause in a SELECT statement will cause the data return to fail
In general, it is not advisable to store the password in the code (or connection string). It would be better to have the user prompted. The .Net Provider uses a similar connection dialog as the ODBC driver. This should also handle the natural expiration of passwords based on the Password Security rules defined in the Teradata environment and prompt the user for a new password automatically.
I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I'm using an ADODB connection and need to know what my database DSN is. How can I find this?
I'm using SQL Server 2008, thanks! :D
A DSN (data source name) is an indirect way of referring to the database. You have to create them manually (or semi-automatically using a wizard of some kind). Go to ControlPanel->AdministrativeTools->DataSources (ODBC) to see if one has already been defined for the database to which you want to connect.
But I think you might mean "connection string", not "DSN". There are many, many ways to tell ADODB how to find and connect to your database (DSNs are just one of those), but you always need a connection string.
I have often turned to ConnectionStrings.com to help me through the maze of similar-but-not-identical options.
There may not be a DSN. DSNs are not created automatically.
I'm not sure you really mean DSN, as a DSN is an ODBC concept. Still, look in Administrative Tools->Data Sources (ODBC).