VB6 + CR 11.5(R2) + SQL Server - Authentication Problems
Hi.
I have a VB6 application that uses a SQL server and the reports are designed in CR 11.5 (R2).
The Application access to SQL is done through Windows Auth, but when I try to print any report, a windows always shows up requesting me to authenticate via SQL.
Please, how to resolve this?
Best regards.
Luis Miguel Coelho
Hi Luis Miguel Coelho,
When you designed the reports did you check on the option to use Trusted authentication? If not, try a new report and see if that fixes the issue.
I assume you are using the RDC ( craxdrt.dll ) as the report engine?
How are you connecting, OLE DB or ODBC?
When you are setting the lgo on info in code are you also enabling Tursted Authentication?
Thank you
Don
Similar Messages
-
SAP Crystal Report using SQL Server Authentication and Windows Authenticati
I'm a SAP Crystal Report, version for Visual Studio 2010 Beginner
my ingredients are
1.windows 7 ultimate service pack1
2.sql server 2008 standard edition
3.visual studio 2010 pro
4.SAP Crystal Report, version for visual studio.net
I was created a report named customersByCity.rpt using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> I'm supply Server, User ID, Password and Database. I assume me using SQL Server Authentication for my report
Then, my ASP.NET files as following
//ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewCustomersByCity.aspx.cs" Inherits="viewCustomersByCity" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div><asp:Label ID="lblMsg" runat="server" BackColor="Yellow" ForeColor="Black"></asp:Label>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"></CR:CrystalReportViewer>
</div>
</form>
</body>
</html>
//code-behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
public partial class viewCustomersByCity : System.Web.UI.Page
private const string PARAMETER_FIELD_NAME = "city";
private ReportDocument customersByCityReport;
private void ConfigureCrystalReports()
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = @"WKM1925-PCWKM1925";
connectionInfo.DatabaseName = "Northwind";
connectionInfo.UserID = "sa";
connectionInfo.Password = "sysadmin25";
SetDBLogonForReport(connectionInfo);
private void SetDBLogonForReport(ConnectionInfo connectionInfo)
TableLogOnInfos tableLogOnInfos = CrystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
tableLogOnInfo.ConnectionInfo = connectionInfo;
private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
ParameterValues currentParameterValues = new ParameterValues();
foreach (object submittedValue in arrayList)
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = submittedValue.ToString();
currentParameterValues.Add(parameterDiscreteValue);
ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions[PARAMETER_FIELD_NAME];
parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
protected void Page_Load(object sender, EventArgs e)
customersByCityReport = new ReportDocument();
string reportPath = Server.MapPath("customersByCity.rpt");
customersByCityReport.Load(reportPath);
ConfigureCrystalReports();
ArrayList arrayList = new ArrayList();
arrayList.Add("paris");
arrayList.Add("Madrid");
arrayList.Add("Marseille");
arrayList.Add("Buenos Aires");
arrayList.Add("Sao Paulo");
ParameterFields parameterFields = CrystalReportViewer1.ParameterFieldInfo;
SetCurrentValuesForParameterField(customersByCityReport, arrayList);
CrystalReportViewer1.ReportSource = customersByCityReport;
1st scenario
When in a runtime, it's keep appear a dialog box. This dialog box ask me to suppy Server, User ID, Password and Database. Once all information is supplied, my report display the data as expected
2nd scenario
I change my report using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> checked on Integrated Security. I just choose Server, and Database. I assume me using Windows Authentication
When in a runtime, there's no dialog box as above. My report display the data as expected. really cool
Look's like, when report using SQL Server Authentication there's some problem. but, when report using Windows Authentication, it's fine.
I'm looking for comment. Please help meHello,
MS SQL Server 2008 requires you to install the MS Client Tools for 2008.
Once install then update all of your reports to use the SQL Native 10 as the OLE DB driver.
The try again, if it still fails search, lots of sample log on code in this forum.
Don -
How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication
Hi ALl,
I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
. This package runs fine if i click the server connection properties type the password and save it.
Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying
"Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
Can someone please help me with any suggestions on how to do this?
I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
So, If someone can please throw any suggestions or ideas on this it would be great.
ThanksYou need to add password as a config item and set it from the file source or sql table
see this as an example
http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
Users using SQL Server Authentication
What tables/views would I use to create a list of users using SQL Server Authentication? I want the name, whether password (complexity) policy is set and whether password expiration is set. I only want current/active users.
You can query query sys.sql_logins to get this information.
http://msdn.microsoft.com/en-GB/library/ms174355.aspx
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com -
Create a SQL Server authentication login
I am trying to create an SQL Server authentication login. using the documentation given http://azure.microsoft.com/en-gb/documentation/articles/sql-database-get-started/#QueryDBSysData
with the below sql statement
CREATE LOGIN login1 WITH password='Password1';
but gives an error
Msg 5001, Level 16, State 1, Line 1
User must be in the master database.
how do i get around this problem?Hi roma_victa,
Please make sure that you issue the command in the master database of your logical server, otherwise it will fail.
Thanks,
Jan -
RE: Database (SQL-SERVER) access problem
Have you used NT Control Panel/ ODBC to set up the ODBC data source name?
You have to define the data source (database) SecTrade as well as the
driver to be used (SQL Server). This can be done by selecting the Add
button on the Data Sources screen in Control Panel/ ODBC.
Hope this helps.
Sanjay Murthi
Indus Consultancy Services, Inc.
From: Administrator
Sent: Wednesday, August 13, 1997 6:49 PM
To: "'[email protected]'"
Cc: murthis; thyagarajm; thyagarm; vasasm; chandraa
Subject: Database (SQL-SERVER) access problems
MCI Mail date/time: Mon Aug 11, 1997 10:28 pm EST
Source date/time: Mon, 11 Aug 1997 19:25:34 +0530
Hi Forte-Users,
We have a setup a Sql-Server database on a NT server. In the Forte
EConsole,
we have
setup a ODBC-type Resource for this server, named SERVER2_ODBC. This NT
server
is configured as a Client Node in the active Forte environment. Note
that
Server2 is not
the Forte server, but has Forte installed. There is another NT server
which
acts as the
Forte server. NODEMGR and Sql-Server are running on SERVER2.
In our application, we have a DBSession SO with the database source
as SERVER2_ODBC, Userid=ForteInstructor. When running the application,
Forte
throws an exception, the gist of it being as follows:
USER ERROR: (This error was converted)
Failed to connect to database: SecTrade, username: ForteInstructor.
[Microsoft][ODBC Driver Manager] Data source name not found and no
default
driver specified
We have tried
1) Installing ODBC drivers on the NT server (Server2)
2) Accessing local databases from Forte clients which works fine
3) Accessing the Sql-Server database through Isqlw (Sql-Server Client
s/w) -
It works.
Could someone suggest what we should try to get rid of this problem?
Thanks for any help,
Kishore PuvvadaRajsarawat wrote:
Dear sir/mam,
I have installed sql server 2005 (server) and on another computer installed client. It installed successfully but on client side it does not seen, from where should i start it. so please send me procedure to install sql server 2005 on both side(client and server).You have to turn on network (external to your computer) access.
Under programs->sql server look for "surface" -
I just got a new work station (win7 Pro) which has the following sql server
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
returns
12.0.2254.0 RTM Developer Edition (64-bit)
Select @@version
returns
Microsoft SQL Server 2014 - 12.0.2254.0 (X64)
Jul 25 2014 18:52:51
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
I added/created a new (random) user account to this server [joe123] and made him sa and mapped him to everything, the password never expires, ...
when I try to login to this local server the login fails, but I can log into this server with my windows integrated account (also sa). What do I need to do so that the joe123 account can login to the server
Rich PCheck if both "SQL Server and Windows Authentication mode" is set (not just Windows Authentication mode). Server-->right click and select properties --> Security
Satish Kartan http://www.sqlfood.com/ -
How can I allow only users in my MS SQL server database to log into my simple chat room?
ThanksI got the urls where you got http://localhost:3000. Mine uses ip instead. Anyway, here is the error:
SyntaxError in RoomsController#index
C:/Rails/rails/lib/lccs.rb:377: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
C:/Rails/rails/lib/lccs.rb:408: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
C:/Rails/rails/lib/lccs.rb:832: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
C:/Rails/rails/lib/lccs.rb:846: syntax error, unexpected keyword_when, expecting keyword_end
when 'result' :
^
C:/Rails/rails/lib/lccs.rb:846: syntax error, unexpected ':', expecting keyword_end
C:/Rails/rails/lib/lccs.rb:868: syntax error, unexpected keyword_end, expecting $end
RAILS_ROOT: C:/Rails/rails
Application Trace | Framework Trace | Full Trace:29:in `require'
:29:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `block in require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
C:/Rails/rails/lib/lccs_helper.rb:1:in `'
C:/Rails/rails/app/controllers/rooms_controller.rb:1:in `'
This error occurred while loading the following files:
lccs_helper
lccs
Request
Parameters:
None
Show session dump
Response
Headers:
{"Cache-Control"=>"no-cache",
"Content-Type"=>""}
Thanks -
SQL Server/JDBC Problems...
I know this topic has been posted before, and believe me I've read all of it and followed instructions at least 5 times over. But I just can't get rid of :
Got an exception!
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
On my SQL server side:
1) My Client Network Utility and Server Network Utility both have TCP enabled and default port set to 1433
2) I've set authentication to "SQL Server and Windows" instead of just "windows".
3) For now I'm using my 'sa' account as startup which is set to "SQL Server and Windows" authentication.
4) I've disabled and then enabled TCP a bunch of times, that doesn't seem to help.
5) My SQL Server log says:
2005-02-22 10:12:12.86 server SQL server listening on Shared Memory, Named Pipes.
It should say something about TCP according to the MS SQL help, but I've had no luck with that.
I've even tried NMAP on my computer to check for open TCP ports, and 1433 doesn't show up. My guess is the problem is with SQL Server 2000 (I'm using Java 1.5.0_01 for now). Is there some kind of trick (ritual? animal sacrifice?) needed to get SQL Server to start listening on TCP? God knows I''ve tried everything short of kicking the **** out of my purchased boxed set. Please...any help in the matter would be GREATLY appreciated. ThanksI had the same problem on my windows XP laptop.
For windows XP you need SQL Server 2000 service pack 3.
Of course you may not be using windows XP but the service pack will not hurt. -
MS SQL Server 2000 Problem to Connect
Hi There
I have a problem with MS SQL Server 2000 with Service Pack 3 and JDBC from Microsoft
My tools are:
- Windows 2003 Server Standart Edition
- MS SQLServer 2000 with ServicePack 3
- JDBC from Microsoft with ServicePack 3
I want to connect in the database using JDBC.
At first time, I follow the example to chance the authentication of SQL
Server
http://www.banmanpro.com/support/sql2k.asp
Now, when I will try out to connect in the SQL Server, I receive this error
message
java.sql.SQLException: [Micro$oft][SQLServer 2000 Driver for
JDBC][SQLServer]Login failed for user 'Administrador'.
I'm trying to connect in SQL Server using my Windows Account, in other
words, I'm using the ADMIN account of Windows and which was registered in
the SQL Server.
In then DriverManager.getConnection line from Java, the Username and
Password is same the operation system, but I receive the error below.
Maybe Can you help me please?You can't log in using Windows credentials using the MS driver (yes, I know that sounds kind of funny). Use jTDS for that, if you really need it (or if you encounter any other problems with the MS driver). Otherwise log in using SQL Server credentials (try with user sa and blank password if not sure).
Alin. -
MX7 SQL SERVER Datasource problem
hello
I installed MX7 and I do not manage to create a datasource
which
point towards my dB MSSQL SERVER on local, it posts me this:
Connection verification failed for data source: blanko
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver]Error
establishing socket. Unknown host: (local)
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer
JDBC Driver]Error establishing socket. Unknown host: (local)
under Coldfiusion server 5.5 there was the possibility of
checked “Trusted connnection” and it had no prob with
MSQLSERVER there Apparently it is necessary to work with the JDBc
drivers but I do not have any idea of how to install it I am sure
that it is a traditional error, if somebody has already encountered
the problem,
thank you to light me
thks Sam
Configuration: Windows 2003 Internet Explorer 7.0I found why it did not recognize localhost, because I placed
(localhost) between bracket because on CF 5.5 it was the case for
(local), therefore now it recognizes apparently the localhost as
server but it is another problem now: it did not recognize the
username and password,
however I configured SQL SERVER 2005 in mixed mode and thus
I test with login: Administrator and password empty (because I
don't have password on Windows authentication) and I also test with
username: sa and my password admin but without success, here what
it indicates as error:
Connection verification failed for data source: blanko
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver]Error establishing socket.
Connection refused: connect
in addition I do not know if there is a bond, (I work under
win 2003 standard edition) and according to what I read on the Net,
it may be that it is a problem of port, can be the port 1433 is not
open? If I make on DOS prompt: telnet localhost 1433 ==> failure
to connect whereas telnet localhost 80 works
I even tried to connect with
username: sa
pwd: mypwd
port: 80 (I know that 80 is the port for HTTP)
it posts the following message:
Connection verification failed for data source: blanko
java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]No
more data available to read.
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver]No more data available to read
thanks for your help -
Hello,
Can anyone help me that i installed sql server 2014 after installation when i open it it is asking for server name ,how to solve this problem?Hello,
Can anyone help me that i installed sql server 2014 after installation when i open it it is asking for server name ,how to solve this problem?
First please tell did you installed named instance or default instance. Did you installed licensed version/evaluation edition or express edition.
You always connect to SQL Server using SSMS like
Hostname\instancename. You can go to Run type cmd and in command prompt type hostname the name returned is your hostname. Instance name is name of SQL Server instance which you created with installation ( if you created one or else it will be default instance)
If it is default instance and not a SQL Express you can just type dot. Dot like
. and can connect. If it is SQL express you can connect like Hostame\SQLEXPRESS.
If it is named instance connect like Hostname\instancename.
PS: Use account which you have added as administrator while installing SQL server as shown by Javier. if you selected mixed mode authentication you can connect by SA.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
My TechNet Wiki Articles -
Crystal Report 8.5 with SQL SERVER 2005 problems
Post Author: AREVA
CA Forum: Data Connectivity and SQL
Hi All !We have some problems with Crystal Reports version 8.5 with SQL Server 2005: 1) When we want to generate a report (using data in SQL Server 2005) we have a popup message error : "impossible to loaded pdssql.dll".2) If we want to use SQL Server 2005, which Crystal Reports version we must used ? Is there any restrictions with this connectivity with 8.5 version ?Please, let me known, all informations about SQL Server 2005 and Crystal Report 8.5.Thanks for all !Best regards AnthonyHello Kamlesh,
There is no expectation that the ActiveX viewer (RDC?) from CR8.5 will work in any version of Visual Studio .NET. There is also no expectation that the ActiveX viewer from CR8.5 will work on a machine with a 64 bit operating system.
You're using VS2008. You should migrate to the bundled edition of CR for VS2008 (v10.5), the ReportDocument object, and the .NET Windows form viewer or Web form viewer.
Sincerely,
Dan Kelleher -
Java and MS SQL Server 2000 problem, please help
please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
Can any please help in this regard.
String userNumber = (String)userNumField.getValue();
char[] userPasswordArray = userPasswordField.getPassword();
String userPassword = new String(userPasswordArray);
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
java.sql.PreparedStatement statement = connection.prepareStatement(
"SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
"FROM SYS_USER " +
"WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
statement.setString(1, userNumber);
statement.setString(2, userPassword);
java.sql.ResultSet result = statement.executeQuery();
if(result.next()) {
String userStatus = result.getString(4);
if(userStatus.equals("logged on")) {
String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
loginErrorPane.setMessage(loginErrorMessage);
loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
loginErrorDialog.setVisible(true);
else {
String userClassification = result.getString(3);
if(userClassification.equals("Administrator")) {
AdminHomePage newAdminHomePage = new AdminHomePage();
newAdminHomePage.setVisible(true);
else if(userClassification.equals("Educator")) {
EduHomePage newEduHomePage = new EduHomePage();
newEduHomePage.setVisible(true);
statement = connection.prepareStatement(
"UPDATE SYS_USER SET USER_STATUS = ? " +
"WHERE USER_NUMBER = ?");
statement.setString(1, "logged on");
statement.setString(2, userNumber);
statement.executeUpdate();
dispose();
}Doesn't the following link give you enough information?
http://www.google.com/search?q=invalid+descriptor+index
Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range. -
SQL Server excuteBatch() problem....
Hi All,
I am trying to Bulk insert using addBatch() and excuteBatch()
which works fine.
The problem I am facing is, when I am inserting 50 queries in excuteBatch(), even
one of them fails, ( due to some foriegn key violation ) whole process stops.
Can we able to ignore all the failed ones, and proceed till the end in excuteBatch()?
I am using MS JDBC Driver for SQL Server and WL server 6.1 sp3.
any help will be really helpful..
thanks,
ArunArun wrote:
Hi All,
I am trying to Bulk insert using addBatch() and excuteBatch()
which works fine.
The problem I am facing is, when I am inserting 50 queries in excuteBatch(), even
one of them fails, ( due to some foriegn key violation ) whole process stops.
Can we able to ignore all the failed ones, and proceed till the end in excuteBatch()?
I am using MS JDBC Driver for SQL Server and WL server 6.1 sp3.
any help will be really helpful..
thanks,
ArunHi. Duplicate the problem in a standalone program, without weblogic code.
It sounds like a driver bug, and you should post this to the ms jdbc newsgroup.
Joe Weinstein
Maybe you are looking for
-
Use ComboBox TableCellEditor - values are not saved to the table model
Hi, I got a combobox cell editor that uses to edit one of the columns. And i got an ok button that uses to collect the data from the table and save it to the db. In case i started editing of a cell and the editor is still displayed- if i will click o
-
XEM - Unable to load the initial data or the variances(delta) data into sys
I am installing xEM 2.0 SP 10 (SAP xApp Emissions Management) in a windows environment with SQL 5000. I installed xEM on NW 2004, usage types AS Java and EP 6. I am attempting to load the initial data or the variances (delta) data into the system.
-
MSN is my home page and when I click on the hotmail link in the top left hand corner of the page it always opens in a new window even if I press middle-click/ ctrl keys. The hotmail link is the only link that I have had this problem with thus far. Ca
-
Sync session failed to start in iTunes after updated to iOS 7
Sync session failed to start in iTunes after updated to iOS 7
-
ORA-01801 does not exist in Oracle Errors Documentation
Hi, <br> RMAN issed to me the following error: <br> RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ==========================================