|
Everyone seem to think this about space and performance, it should be about support. Someone looking at the schema in the future should not have to chase down the usage of redundant tables.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Indeed!
Oh, and the OCD as well.
|
|
|
|
|
What I am tring to do is to select the username, password, and role from studentstable using queryForObject.
In my JdbcTemplate syntax is
--------------Public static Object queryForObject(String sql,RowMAPPER mapper,Object ...args)----------------
<code>public class JdbcStudentDAO implements StudentDAO{
public String getLogin(StudentTO sto) {
String sql="select username,password,role from studentstable";
System.out.println(sql);
-----------------------------Below has something wrong with queryForObject-----------------------------------------------------------
Object obj=JdbcTemplate.queryForObject(sql,new
StudentRowMapper(),sto.getUsername(),sto.getPassword(),sto.getRole());
StudentTO sto1=(StudentTO)obj;
System.out.println(sto1);
return sto1.toString();
}
}</code>
-------------------------This is my RowMapper where I'm getting all rows of my database, as shown below--------------------
public class StudentRowMapper implements RowMapper{
public Object mapRow(ResultSet rs) throws SQLException {
StudentTO sto=new StudentTO();
sto.setSid(rs.getInt(1));
sto.setName(rs.getString(2));
sto.setUsername(rs.getString(3));
sto.setPassword(rs.getString(4));
sto.setEmail(rs.getString(5));
sto.setPhone(rs.getLong(6));
sto.setRole(rs.getString(7));
return sto;
}
}
-----------------------------------This is an abstract method in StudentDAO---------------------------
public interface StudentDAO {
public String getLogin(StudentTO sto);
}
-- modified 13-Jul-17 5:40am.
|
|
|
|
|
LOKENDRA YADAV wrote: select username,password,role from studentstable
Not an answer to your question, but there's a more fundamental problem with your code: You're storing passwords in plain text.
NEVER do that. And don't use reversible encryption either. Store a salted hash of the password, using a unique salt per record.
Secure Password Authentication Explained Simply[^]
Salted Password Hashing - Doing it Right[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi friends,
I need to Import Data from Salesforce into SQL Server and export from SQL table to Salesforce using SSIS, can anybody please help me what is the better option available like any .net drivers etc. Or if we can directly import into SQL table by using any query that's also fine. As I am not much familiar any help would be very great.
I am also reading articles about these from google, so far didn't find free drivers, any help would be greatly appreciated.
Thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
What you want would require a connection string and credentials to directly access their database, I can't see that happening.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I have downloaded Easysoft ODBC driver, but getting hard time to setup my DSN and connect to it, any idea which is best and easy to use ODBC driver to connect to the Salesforce.com, any help or idea would be very helpful - thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
|
If you want to transfer Data from Salesforce to SQL Server, you can try Devart SSIS, but I bigger fan of cloud solutions, `cause they are easier for me (E.g. <a href="">https:
|
|
|
|
|
Hi,
I am getting the following error when I am trying to load SSIS Package using C# code:
Microsoft.SqlServer.Dts.Runtime.Package, ErrorCode : -1073676264, Description : Error loading value "<DTS:Property xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:Name="PackageFormatVersion">6</DTS:Property>" from node "DTS:Property".
, SubComponent: , HelpFile, HelpContext0, IdofInterfaceWithError
I got this error through the Event Listener I passed into the Load method call. This code was working before but suddenly stopped Working. The changes that happened in this mean time are, I needed to change my laptop, as it is new Laptop I needed to install all Software, some of them I installed online Evaluation versions like SQL Server 2008 R2 and 2012 because they were not available in there.
Here is the code that I used to load the Package from FileSystem:
if (!string.IsNullOrEmpty(PackagePassword))
{
_app.PackagePassword = PackagePassword;
}
//DTSEventListner eventListner = new DTSEventListner();
_Pkg = _app.LoadPackage(packageFullPhysicalPath, Listerner);
_PkgLocation = packageFullPhysicalPath;
_Status = DTSPackageStatus.Loaded;
Any help would be very helpful. Thanks in advance.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
PackageFormatVersion 6 suggests the package was created for SQL 2012.
Are you trying to load it with SQL 2008 R2, or using the 2008 R2 libraries?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
But now I have installed SQL Server 2012, is it because of .Net version or SQL Server Version I have installed SQL Server 2016 first then installed 2009 R2 but now I uninstalled 2016 but installed the 2012 from online Evaluation version thinking I will apply the key from company after Package starts working. Did I do anything wrong, any help would be greatly helpful thanks my friend. It bothers more when a thing starts working and then stops.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Hi Rick,
I am getting the following Warnings, is this something can be helpful for me, any advice would be very helpful my friend. Thanks my friend.
Severity Code Description Project File Line Suppression State
Warning There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Microsoft.SQLServer.DTSRuntimeWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. EncryptDecryptSecretStrings
<br />
Warning There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Microsoft.SQLServer.DTSRuntimeWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. FileWatcherScheduleApp
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
That suggests it's a 32/64-bit issue. You need to change your project to target "x86" instead of "Any CPU".
How to: Configure Projects to Target Platforms[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Its nice to do it but what if I deploy the code in Production and there if its different OS or different version of OS like 32 bit or 64 bit etc. Should I ignore this as it is Warning only because if it messes in the Server its going put me into more troubles.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
If you're referencing a 32-bit assembly, you don't have a choice; you have to target x86.
A 64-bit OS won't have any problems running a 32-bit application.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks my friend
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
i wish to actually view my data in a oracle form developed on 6i based on date parameter but if i try to work on my oracle forms it dosent give me data acoordingly here is the query whcih i am using
SELECT e."Deal_No" deal_no, e."Remarks" Counterparty, m."MaturityDate" Maturity_Date, m."PriRedem" Principal,
(m."MaturityDate" - To_date) Days_to_Mat
FROM MM_T_BORROWING e, MM_T_BORROWING_PM_DETAIL m
Where e."DeskCode" in ('10','11','12','13') and e."Value_Date" <= to_date and e."Maturity_Date" > to_date and e."Status" not in ('C', 'D', 'Z', '0','X')
and e."Deal_No" = m."Deal_No" and "PriRedem" > '0' and m."MaturityDate" > to_date ;
|
|
|
|
|
And if you just run that query do you get any data returned?
|
|
|
|
|
You probably are not getting any results because you have not defined the parameter to pass to the to_date function.
to_date (string_to_convert_to_date, [optional parameters if required]).
If you are trying to pull from "today" then use to_date(sysdate)
|
|
|
|
|
how can we connect to ms access 2016 using oledb ..what would be the connection string for that
|
|
|
|
|
|
i went through the ink that u provided but if it comes to connect access 2016 its not working
|
|
|
|
|
m trying to import excel 2016 file to gridview in vb 2005 and i have installed access database of 2016 while importing m getting the oledb exception called couldn't find install able isam ...in this wazy the problem is only with connection string ,hence what connection string should be used when connecting with acces 2016 in order to import excell 2016 file..i have gone through ur suhhested link but dint work out for access 2016
|
|
|
|
|