hi
i 'm using sql server 2008 sp1 and i'm using ODBC to connect to it.
when i call (execute) a procedure, most of the times i get this error " [Microsoft][ODBC SQL Server Driver]Invalid cursor state".
pleas help me how to solve this problem.
hi
i 'm using sql server 2008 sp1 and i'm using ODBC to connect to it.
when i call (execute) a procedure, most of the times i get this error " [Microsoft][ODBC SQL Server Driver]Invalid cursor state".
pleas help me how to solve this problem.
This is the error I am getting: Database Connector Error: 'IM006:[Microsoft][ODBC Driver Manager] Driver's SQLSetConnect Attr failed [Database Vendor Code: 4060]'
This only occurs when connecting to a non-system database, master, etc connect fine.
I have tried using both access data connector and Crystal Reports 2008, same results on both. Any help would be greatly appreciated.
Hello Everyone,
I have a table on sql server 2012 with the below info:
Table name: Hotel
Column name: Hampton
Values such as 1) Room 101/First Floor/SwimmingPool
2) Room 201/Second Floor/Gym
3) Room 301/Third Floor/OpenRoof
These values are extracted from some random table and combined by / sign.
How can I find or track where these values (Room 101, First Floor, SwimmingPool) are arriving from in the database? I don't have any access to the interface so I have to find out how the values are getting into that column.
Any ideas?
Thank you.
Hi All,
I have two connected computers via router, running under same home group. Each is a i3 pc running win 7. SQL Server 2008 is installed on one as server (back end) and Access 2007 on the other as client (front end), where tables in Access database were migrated to SQL Server via SQL Server Migration Assistant for Access (when Access database was located on server before it was moved to client). To try to access data on server, I went through 'SQL Server does not exist or access denied' problem, then after attempts to fix network parameters I got the message 'login failed for user 'SAID\Guest', where 'SAID' is the server name and 'Guest' is an account name that has been created on server as a result of my try to access data. First account was turned off, then I turned it on, while the server was (and still) under an administrative account. SQL Server authentication was 'Windows only', then I turned it to 'Windows and SQL Server', followed by restart of SQL Server. Message still persists. Any solution? Bear in mind I need to remain on server under the administrative account.
Best regards.
Prof. Dr. Said El Noshokaty
I am in the middle of setting up an Excel spreadsheet that will execute a stored procedure I have created and return the results to Excel. Pretty much following the example set here:
http://datapigtechnologies.com/blog/index.php/running-a-sql-stored-procedure-from-excel-with-dynamic-parameters/
But, the problem I am stuck on and unable to yet find an answer to, is can I execute the procedure from within Excel and instead of specifying a parameter enter a WHERE clause. At the moment the last step of my stored procedure is:
SELECT * FROM MY_TABLE
WHERE ([PRODUCT] LIKE 'DESK-%') AND (NOT([DISCOUNT VALUE] IS NULL))
But, I cannot find if it is possible to execute this from within Excel. I am not sure if it I am able to set the WHERE as a parameter which may be the way I should be going about this.
Thanks.
Hi Team,
I am using SQL Instance and Window Authentication in this case it is taking user name as my local domain\username.
But the instace is of different domain which I want to access and want to change that domain name and user name.
Can I change it If yes how I can able to change it..Pl help me .
Yogesh Rawat
Hi,
I am getting following stack trace while running SQL query using jdbc driver for SQL server:
com.microsoft.sqlserver.jdbc.SQLServerException: The "variant" data type is not supported. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190) at com.microsoft.sqlserver.jdbc.TypeInfo$Builder$16.apply(dtv.java:1996) at com.microsoft.sqlserver.jdbc.TypeInfo$Builder.build(dtv.java:2158) at com.microsoft.sqlserver.jdbc.TypeInfo.getInstance(dtv.java:2221) at com.microsoft.sqlserver.jdbc.StreamColumns.setFromTDS(StreamColumns.java:46) at com.microsoft.sqlserver.jdbc.SQLServerResultSet$1CursorInitializer.onColMetaData(SQLServerResultSet.java:217) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:77) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.<init>(SQLServerResultSet.java:311) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1526) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:285) at XSSFReportGenerator.dataExtractor(XSSFReportGenerator.java:309) at XSSFReportGenerator.printXLS(XSSFReportGenerator.java:213) at ExcelGenerator.generateReports(ExcelGenerator.java:39) at ConnectSQL.main(ConnectSQL.java:295)
I am trying to execute following SQL query:
SELECT DB_NAME() As 'Db Name',SCHEMA_NAME(schema_id) As 'Schema Name', OBJECT_NAME(i.object_id) AS 'Object Name' , o.type_desc As 'Object Type' , p.partition_number AS 'Partition Number' , fg.name AS 'File Group' , p.rows As 'Rows' , au.total_pages AS 'Pages' , CASE boundary_value_on_right WHEN 1 THEN 'less than' ELSE 'less than or equal to' END as 'Comparison' , rv.value As 'Value' , CONVERT (VARCHAR(6), CONVERT (INT, SUBSTRING (au.first_page, 6, 1) + SUBSTRING (au.first_page, 5, 1))) + ':' + CONVERT (VARCHAR(20), CONVERT (INT, SUBSTRING (au.first_page, 4, 1) + SUBSTRING (au.first_page, 3, 1) + SUBSTRING (au.first_page, 2, 1) + SUBSTRING (au.first_page, 1, 1))) AS 'First Page' FROM sys.partitions p INNER JOIN sys.indexes i ON p.object_id = i.object_id AND p.index_id = i.index_id INNER JOIN sys.objects o ON p.object_id = o.object_id INNER JOIN sys.system_internals_allocation_units au ON p.partition_id = au.container_id INNER JOIN sys.partition_schemes ps ON ps.data_space_id = i.data_space_id INNER JOIN sys.partition_functions f ON f.function_id = ps.function_id INNER JOIN sys.destination_data_spaces dds ON dds.partition_scheme_id = ps.data_space_id AND dds.destination_id = p.partition_number INNER JOIN sys.filegroups fg ON dds.data_space_id = fg.data_space_id LEFT OUTER JOIN sys.partition_range_values rv ON f.function_id = rv.function_id AND p.partition_number = rv.boundary_id
Please help!
We have a 3rd party application that uses a system dsn to connect to a database. We moved the database to a new server. We kept the database name and the username. We have to use SQL Authentication. Pointing the dsn to the new server is easy. I can do this through the registry. On the new server, we changed the password for SQL Authentication. We have not gone live yet. I have to change the password on the system dsn for 400 workstations. Can some one point me to a tool or script that allows me to change the password.
Thank you.
Hi,
I have a MFC desktop application developed using VS2010 and uses ODBC for database communication. The application was using MBCS and I am converting it in to Unicode.
When converting the application into Unicode, I noticed that I am no longer able to edit the existing access databases and am able to only view the databases because the ODBC cursor library is not loaded during SQLConnectW(). (It shows the message "[Microsoft][ODBC Driver Manager] Cursor library not used. Load failed"). Also, the SQLGetInfo() for SQL_POSITIONED_STATEMENTS returns 0 in unicode. Also I noticed that there is a KB article Q259477 which says ODBC Unicode cursor support is not possible.
Currently following is what I want to know?
1. Is there any other way to make cursors work with ODBC in Unicode? I am using SQL_OV_ODBC3 when setting SQLSetEnvAttr().
2. If I use SQL_CUR_USE_DRIVER instead of SQL_CUR_USE_ODBC, will it solve the cursor problem in Unicode? If it solve, what will be the impact of changes I have to make?
3. If it is not possible using ODBC, what should be a easier and faster way to move to any other approach? Should I look for OLEDB or ADO .Net? Which among them will be easier to implement? I would prefer to use ADO .Net from long term perspective.
Regards,
Janardhanan.R.
Janardhanan.R.
We are getting an error anytime we use a four part name in a SQL query accessing an iSeries server that is defined as a linked server. Any assistance
you can provide in resolving this issue is greatly appreciated.
System configuration: Windows Server 2008 R2 Standard (64 bit) Service Pack 1 installed, 12GB memory, 2.53GHZ and SQL Server 2008 R2 RTM - 10.50.1600 – no service packs installed
In query analyzer the following statement will run fine: SELECT * FROM OPENQUERY (CALVIN, 'SELECT * FROM DVBDCSTC.BDRPFCOD')
In query analyzer the following statement gives an error when first run and hangs on subsequent executions:
SELECT* FROM CALVIN.A10B5181.DVBDCSTC.BDRPFCOD
Here is the error on the first execution:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "CALVIN" reported an error. The provider reported an unexpected catastrophic failure.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "MSDASQL" for linked server "CALVIN".
The query window has to be closed and reopened in order to be able to run these queries again. Otherwise the execution of the queries appears to hang.
The linked server is using IBM iSeries Access for Windows(V6R1M0) through ODBC data source defintions as defined below:
Linked server definition
General
Linked Server: CALVIN
Server Type: Other data source
Provider: Microsoft OLE DB Provider for ODBC drivers
Product name: iSeries
Data source: CALVIN
Security
Be made using this security context
Remote loging: XXXXXX(valid iSeries account
With password: XXXXXXX(valid password for iSeries account)
Server Options
Collation Compatible: False
Data Access: True
RPC: False
RPC Out: True
Use Remote Collation: True
Collation Name: Blank
Connection Timeout: 0
Query Timeout: 0
Distributor: False
Publisher: False
Subscriber: False
Lazy Schema Validation: False
Enable Promotion of Distributed Transactions: True
ODBC Data Source Definition(iSeries)
General
Data Source Name: Calvin
Description: System i Access for Windows ODBC data source
System: CALVIN
Connection Options
Default user ID: Use System i Navigator default
Signon dialog prompting: Prompt for SQLConnect if needed
Security: Use same security as System i Navigator connection
Server
Naming convention: SQL naming convention
SQL default library: QGPL
Library List: SQDBCAPP SQBDCME SQBDCOBJ *USELIBL SQNDCSTC2
Connection type: Use ODBC access mode, Call allowed
Commit Mode: Read uncommitted
Data Types
Double Byte Character Set:Report as supported: Off
Double Byte Character Set: Report length in bytes: On
Date and time data types: Report date as character data type: Off
Date and time data types: Report time as character data type: Off
Date and time data types: Report timestamp as character data type: Off
Decimal Floating Point Data Type: Report as character data types: On
Decimal Floating Point Data Type: Report as double data type: Off
Rounding mode: Half Even
Packages<o:p></o:p>
Enable extended dynamic (package) support: On
Package library: QGPL
Cache package locally: Off
Package usage: Use: Off
Package usage: Use/Add: On
Return code for unusable package: Warning
Performance
Enable lazy close support: Off
Enable pre-fetch of data for queries: On
Enable data compression: On
Use blocking with a fetch of 1 row Record blocking size: 256
Language<o:p></o:p>
Sort type: Sort based on HEX values
Catalog
Library view: Default library list
Object description type: i5/OS object description
Enable search patterns: On
Conversions
Convert binary data(CCSID 65535) to text: Off
Diagnostic
Enable Database Monitoring: Off
Enable the Start Debug(STRDBG) command: Off
Print job log at disconnect: Off
Enable job trace: Off
I am executing a prepared DELETE statement on an array or parameters. The problem is with getting the number of rows affected (deleted) by each of the parameter set. According to the documentation[1], whether this information is available is determined by the SQL_PARAM_ARRAYS_ROW_COUNTS property as returned by SQLGetInfo. If the value of this property is SQL_PARC_BATCH, then the individual counts should are available.
While the SQL Server native client returns SQL_PARC_BATCH, the behavior I am observing is exactly the opposite. That is, the first call to SQLRowCount returns the total number of affected rows by all the elements in the array of parameters. And calling SQLMoreResult gets me SQL_NO_DATA.
Also, the documentation for SQLRowCount from the Native Client ODBC reference[2] seems to imply that this function returns the total count.
So that's the inconsistency that I am observing. Can someone from the ODBC product team confirm that only total count is available? Also, if you can suggest a way to get individual counts, that would be very helpful.
[1] http://msdn.microsoft.com/en-us/library/ms714039(v=vs.85).aspx
[2] http://msdn.microsoft.com/en-us/library/ms131352.aspx
Dear all,
I had to migrate a custom Acc2007 application to a new server as well as its underlying SQL Server database. All data is stored in a dedicated SQL Server 2008 x64. During migration the SQL DB has been left unchanged in terms of SQL Server version. Access had
to be migrated from 2007 to 2010. VBA code incorporated into the custom application has been checked, adjusted, and verified. All working properly. As the custom Access application needs to be compiled to an accde I had to check the whole VBA code in order
to make it work. So far, so good.
Further testing resulted in absolutely poor performance, i.e. all data related operations, e.g. reading records, updating records, et al, take a really long time. I made sure, that all linked tables have been updated as well as SQL users and corresponding access
rights have been successfully migrated. No errors or such, only poor performance.
As I'm absolutey helpless I'd like to know whether I can check some settings, or schedule some certain maintenance taskl on the SQL DB in order to enhance the performance.
Alex
Alexander Ollischer Diplom-Wirtschaftsinformatiker (FH) Citrix & Microsoft Certified Engineer (CCEA, CCEE, MCSA, MCSE, MCDBA, MCTS) Afontis IT+Services GmbH Baierbrunner Straße 15 81379 München Deutschland Telefon (089) 74 34 55-0 Fax (089) 74 34 55-55 mailto:a.ollischer@afontis.de http://www.afontis.de http://www.itganzeinfach.de Amtsgericht München, HRB 109 005 Geschäftsführer: Thomas Klimmer
Hello,
I am trying to create a linked server in SQL 2012 Management Studio with a MySQL external server. I have used the 32bit ODBC driver as instructed by the developer, following this rule:
To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:\windows\sysWOW64\odbcad32.exe.
My connection is fine using the ODBC connector, but when I try to create the linked server I get an architecture mismatch error: The specified DSN contains an architecture mismatch between the Driver and Application Error 7303.
Can someone help?
Best regards
Kostas
Kostas Backas-Systemgraph Technologies
Hi! Please help me to understand if possible. I am migrating from accdb (Access 2007) to MSSQL BE and trying to rewrite queries due to performance problem. My question is that I need to use Stored Procedure and call it from Access. I created simple stored procedure as a test:
CREATE PROC Test1 (@Param AS INT)
SELECT* FROM dbo.BOM WHEREdbo.BOM.Customer=@Param
and calling EXEC Test1 10 from MS ACCESS Pass Thru Query no problem. All works fine and I get value 10 being passed to Stored Procedure and I get right results . Now, how can I assign Access Form Control value in place of value 10? Like Forms![Test]![Text1]? I tried different things like Declaring variable but no luck. Please help
I currently implemented the use of certificates for SP's and have a question on how to get the account mapped to a linked server.
http://www.sommarskog.se/grantperm.html
When I try and add the login to linked server impersonation it fails and says the account doesn't exist. A lot of the stored procedures that are signed with a certificate use a linked server connection.
Thanks!
Need some help here.. we're encountering an msdtc error 1206 when we do inserts from entity framework into SQL Server 2012
Initially we had the error "There was an error reading from the pipe".
We do not have any more info on this, but maybe some of you already had this error...
Thanks,
J.
Jurgen Asselman
MCITP SQL Server 2008 - Database Developer
SQL Server 2012 adept