wegconfig connectionstring ADODB System.Data.Odbc error is [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'TSQL'

 

 

<add name="MYADODBCUSTOMERCONNECTIONSTRING" connectionString="Driver={SQL Server};Server=xxx.xxx.xxx.xxx;Database=myDbname;Uid=xxxxx;Pwd=xxxxx"

providerName="System.Data.Odbc" />

 

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'TSQL'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'TSQL'.

Source Error:

0
dfourlife
1/18/2008 5:34:46 AM
asp.net.object-datasource 16182 articles. 0 followers. Follow

3 Replies
1970 Views

Similar Articles

[PageSpeed] 43


try with
<add name="MYADODBCUSTOMERCONNECTIONSTRING" connectionString="Server=xxx.xxx.xxx.xxx;Database=myDbname;Uid=xxxxx;Pwd=xxxxx"

providerName="System.Data.Odbc" />

or

<add name="MYADODBCUSTOMERCONNECTIONSTRING" connectionString="Server=xxx.xxx.xxx.xxx;Database=myDbname;Uid=xxxxx;Pwd=xxxxx"/>

0
pratima_mcs
1/18/2008 6:45:37 AM

still not working 

0
dfourlife
1/18/2008 1:43:14 PM

Hi dfourlife,

I think you can try to remove your "providerName" section in your connection string. The standard connection string for sql sever ODBC driver is like this:

' VB.NET
Imports System.Data.Odbc
...
Dim oODBCConnection As OdbcConnection
Dim sConnString As String =  "Driver={SQL Server}; Server=MySQLServerName;Database=MyDatabaseName;Uid=MyUsername; Pwd=MyPassword"
oODBCConnection = New Odbc.OdbcConnection(sConnString)
oODBCConnection.Open()

For more detailed information on ado.net connection strings, you can refer to this link: http://www.carlprothman.net/Default.aspx?tabid=86#ODBCManagedProvider

Hope my suggestion helps


Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
Bo
1/21/2008 7:44:34 AM
Reply:

Similar Artilces:

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Hello All, I'm Getting the following error when calling a dll from my vb.net application. [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. The dll was written in vb6 and accesses a sql db using the following connection string. Public Const GLOBAL_DNS As String = "DSN=TransSrvFinal;UID=sa;PWD=admin;" This DLL works fine when called from other Windows Apps. However I'm now trying to call this dll from with in an asp.net application. I'm using vb.net as the codebehind. I'm a...

Microsoft.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]
Hi Everybody, On localhost this application works fine but when I put on remote server. I am getting following errors. For both localhost and server, I am using same remote sql 2000. I will appreciate any help. Thanks, Arif Server Error in '/' Application. -------------------------------------------------------------------------------- ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ')'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more i...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'WinFM SQL PFS'. Login fails.
HiASP pages were properly connecting to SQL DB until I restored from a backup DB.  As soon as I finished restoring from the backup DB, I am getting the following error message.   I did not make any changes on ASP side.  IIS Server and SQL 2K Server is running on a WIN2K Server Box.Please help.Thank you.HTTP 500.100 - Internal Server Error - ASP errorInternet Information ServicesTechnical Information (for support personnel)Error Type:Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login...

Ajax slideshow error: The server method 'GetSlides' failed with the following error: System.Data.SqlClient.SqlException--incorrect syntax near ')'.
Hello there, I am new to asp.net and ajax. I have been working non-stop trying to figure out what leads to the following error on my slideshow page: The server method 'GetSlides' failed with the following error: System.Data.SqlClient.SqlException--incorrect syntax near ')'.   My code is as follows: Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClientPartial Class ProjectInherits System.Web.UI.Page <System.Web.Services.WebMethod()> _ <System.Web.Script.Services.ScriptMethod()> _Public Shared Function GetSlides() As AjaxControlTo...

'Select error: SQLSTATE = 37000 [Microsoft][ODBC SQL Server Driver]Syntax
This is a cross post. Sorry, but I realized that this is most likely a PowerBuilder issue. EAS 3.61 C2 with PB 7.03 components, datawindows and nvo's. Powerdynamo 3.5.2. ODBC connection cache that works. This is an application port from a NT 4.0 server to a Window 2000 Server. The whole application works fine, through CORBA and 7 NVO's with at least 20 other datawindows that I have tested. The ONLY offending datawindow causing 'Select error: SQLSTATE = 37000 [Microsoft][ODBC SQL Server Driver]Syntax error or access violation ' is called from a browser ...

Why does a simple select query in Microsoft Access return the error [Intersolv][ODBC SQL Server Driver][SQL Server]ct_results(): user api layer: internal client library error: Read from the server has
I have applied the information from support document 10447954 but that does not solve the problem. I am running a simple select query with one criteria from one table. Thanks. ...

Error using OdbcDataReader.ExecuteReader and Parameters...ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the variable
This seems to be a common problem but I have not seen any answers yet on this board.   I am porting over to using odbc because I have no choice with my Hosting company,  I was using basically the same code with the SQLDataReader and SQLCommand object and it was fine.  The below code will generate the error.  Help !! Unexpected exception: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the variable '@Role'.. string sql = String.Empty ;sql = "Select * from Associate where Role=@Role and Exit_Date > @Exit_Date";string connString = getConn...

Microsoft OLE DB Provider for SQL Server error '80004005'. SQL Server does not exist or access denied.
Hi,I have a asp web application, where i use sql server 2005 as backend. This application generates reports . Before i was using SQL Server 2000, now its migrated to 2005. When i generate report for small date range then it works fine. But when the date range is big then around half of the report is generated and the following error is thrown. Microsoft OLE DB Provider for SQL Server error '80004005' [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. ...out.asp, line 405  Am sure the webcode is working fine and am connecting to the Da...

SQLSTATE = 37000 [Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error near ',' on line 1
performing data pipe. recieve this error msg any ideas what this means? thanks :-) I'm sure this isn't very helpful, but it probably means there is a syntax error in your SQL, somewhere near a comma, on line 1 :p If you post the SQL statement in question, someone might be able to troubleshoot it.. Or > performing data pipe. recieve this error msg > any ideas what this means? > thanks :-) ...

Why does a simple select query in MS Access return the error: [Intersolv][ODBC SQL Server Driver][SQL Server]ct_results(): user api layer: internal client library error: Read from the server has timed
I have applied the information contained in support document 10447954. That did not resolve the problem. I am running a simple query with one criteria and one table Thanks. Hi Bill, The doc refers to a different ODBC driver (for DirectConnect product) so you might have a completely different problem. The message implies you are using ODBC 12.0 (Client Library based) or prior since the message indicates CtLib info. You might want to post more details involved with getting to this error. You also might want to post exact versions of ASE and ODBC driver, including Open ...

server error in '/' Application Incorrect syntax near ','.
This code used to work now I get an error(error follows code)  can anyone tell me where I went wrong?[vbcode]i = 0            For i = 0 To 7                If requests(i) <> "" Then                    request = requests(i)                    Dim sql1 As String =...

{System.Data.Odbc.OdbcException: ERROR [25000] [Microsoft][ODBC Driver Manager] Failed to enlist on calling object's transaction
Hi All I am using Enterprise Library 3.1 to connect MySQL database with the help of MySQL ODBC driver 5.1. Following is connection string <add name="MySQLConnect" connectionString="Driver={MySQL ODBC 5.1 Driver};server=127.0.0.1;database=MySQLDatabase;user=testUser;option=3" providerName="System.Data.Odbc"/> Everything works fine with this driver except the transaction. Following transaction code always throws an error. {System.Data.Odbc.OdbcException: ERROR [25000] [Microsoft][ODBC Driver Manager] Failed to enlist on calling object's transa...

SQLSTATE 37000 [Sybase][ODBC Driver][Adaptive Server Anywhere] Syntax error or access violation:near 'order'in [order].lodg...
After the database was upgraded to included two more columns in number of tables, the system started giving the following problem in one of the view interface: DataWindows Error Select error: SQLSTATE = 37000 [Sybase][ODBC Driver][Adaptive Server Anywhere]Synatx error or access violation: near 'order' in[order].lodgement_centre ... This is the multiuser access database running on Novell Netware5.1, and Adaptive Server Anywhere 6.0. When this same database file is copied to a local PC and SQL Anywhere 5.0 is used, it works perfectly alright with no problems in any o...

Web resources about - wegconfig connectionstring ADODB System.Data.Odbc error is [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'TSQL' - asp.net.object-datasource

Connecting to Azure SQL DB via JTDS on an Android device
I'm using JTDS 1.2.7 to connect my Android app to a Windows Azure SQL Server. Source code: String connectionString = "jdbc:jtds:sqlserver: ...

Bazaar - Alternative Windows Phone marketplace for homebrew applications DotNetNuke
Message: System.Data.SqlClient.SqlException (0x80131904): Could not allocate space for object 'dbo.EventLog'.'PK_EventLogMaster' in database ...

C# dotnet SQL editor (codebehind side)
In the first post C# dotnet SQL editor (webform side) I've explained the purpose of this "exercise" and suggested a webform proposal for this ...

Specifying the timeout for SSIS 2012 package execution
This is a follow up to my post from last year about executing packages in the SSIS catalog programmatically. The main problem that makes it unworkable ...

DotNetNuke
Message: System.Data.SqlClient.SqlException (0x80131904): Could not allocate space for object 'dbo.EventLog'.'PK_EventLogMaster' in database ...

Running a .NET app against a Postgres database in Docker
... the Postgres connection string in your web.config to point to it. You can leave the username and password the same: name= "Postgres" connectionString= ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Delicious
Keep, share, and discover the best of the Web using Delicious, the world's leading social bookmarking service.

Developer.com: Your Home for Java and Open Source Development Knowledge - Security
Developer.com is your source for Java and Open Source information, how-tos, news, and reports. Developer.com is the place for the latest programming ...

Goodies - ENTERPRISEYNESS
Here are some great resources, tools, and sites I have come across while researching my different projects. videos and conferences Mix 2011 Videos ...

Resources last updated: 11/29/2015 6:26:15 PM