Click here to Skip to main content
14,841,092 members
Home / Discussions / Database
   

Database

 
QuestionOpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
indian14312-Oct-17 7:38
Memberindian14312-Oct-17 7:38 
AnswerRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Victor Nijegorodov12-Oct-17 9:00
MemberVictor Nijegorodov12-Oct-17 9:00 
GeneralRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
indian14312-Oct-17 11:30
Memberindian14312-Oct-17 11:30 
GeneralRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Richard MacCutchan12-Oct-17 22:11
mveRichard MacCutchan12-Oct-17 22:11 
AnswerRe: OpenRowSet is giving error: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". Pin
Richard Deeming13-Oct-17 2:10
mveRichard Deeming13-Oct-17 2:10 
QuestionSSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209302 Pin
indian14311-Oct-17 7:36
Memberindian14311-Oct-17 7:36 
QuestionSQL Server store procedure and prevent sql injection Pin
Mou_kol6-Oct-17 8:45
MemberMou_kol6-Oct-17 8:45 
AnswerRe: SQL Server store procedure and prevent sql injection Pin
Richard Deeming6-Oct-17 9:27
mveRichard Deeming6-Oct-17 9:27 
Simple - don't use string concatenation to build your query.
DECLARE @Name NVARCHAR(50);
DECLARE @sqlcmd NVARCHAR(MAX);
DECLARE @params NVARCHAR(MAX);

SET @Name = '%ra%';
SET @sqlcmd = N'SELECT * FROM [TestDB].[dbo].emp1 WHERE Name Like @Name';
SET @params = N'@Name NVARCHAR(50)';

EXECUTE sp_executesql @sqlcmd, @params, @Name;

Now the question is, why are you using dynamic SQL for such a simple query?
DECLARE @Name NVARCHAR(50);

SET @Name = '%ra%';

SELECT * FROM [TestDB].[dbo].emp1 WHERE Name Like @Name;




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: SQL Server store procedure and prevent sql injection Pin
Mou_kol6-Oct-17 11:30
MemberMou_kol6-Oct-17 11:30 
GeneralRe: SQL Server store procedure and prevent sql injection Pin
Eddy Vluggen7-Oct-17 2:22
professionalEddy Vluggen7-Oct-17 2:22 
GeneralRe: SQL Server store procedure and prevent sql injection Pin
Richard Deeming9-Oct-17 8:59
mveRichard Deeming9-Oct-17 8:59 
GeneralRe: SQL Server store procedure and prevent sql injection Pin
MadMyche22-Nov-17 4:13
mveMadMyche22-Nov-17 4:13 
QuestionImporting the integer values that are coming within " Pin
indian1435-Oct-17 14:14
Memberindian1435-Oct-17 14:14 
AnswerRe: Importing the integer values that are coming within " Pin
jschell6-Oct-17 7:18
Memberjschell6-Oct-17 7:18 
QuestionYou cannot install the 64-bit version of Microsoft Access Database Engine 2016 because you currently have 32-bit Office Products installed Pin
indian1432-Oct-17 11:49
Memberindian1432-Oct-17 11:49 
QuestionRe: You cannot install the 64-bit version of Microsoft Access Database Engine 2016 because you currently have 32-bit Office Products installed Pin
Richard MacCutchan2-Oct-17 21:53
mveRichard MacCutchan2-Oct-17 21:53 
AnswerRe: You cannot install the 64-bit version of Microsoft Access Database Engine 2016 because you currently have 32-bit Office Products installed Pin
jschell4-Oct-17 7:53
Memberjschell4-Oct-17 7:53 
QuestionHow Commonly used are the dotNet Datatables and Datasets? Pin
MarcusCole683328-Sep-17 6:06
professionalMarcusCole683328-Sep-17 6:06 
AnswerRe: How Commonly used are the dotNet Datatables and Datasets? Pin
Eddy Vluggen28-Sep-17 6:58
professionalEddy Vluggen28-Sep-17 6:58 
AnswerRe: How Commonly used are the dotNet Datatables and Datasets? Pin
Richard MacCutchan28-Sep-17 9:45
mveRichard MacCutchan28-Sep-17 9:45 
AnswerRe: How Commonly used are the dotNet Datatables and Datasets? Pin
Mycroft Holmes28-Sep-17 14:08
professionalMycroft Holmes28-Sep-17 14:08 
Questionhow to get the music database for my website? Pin
Member 1322076227-Sep-17 7:57
MemberMember 1322076227-Sep-17 7:57 
AnswerRe: how to get the music database for my website? Pin
OriginalGriff27-Sep-17 8:00
mveOriginalGriff27-Sep-17 8:00 
GeneralRe: how to get the music database for my website? Pin
Member 1322076224-Nov-17 19:08
MemberMember 1322076224-Nov-17 19:08 
AnswerRe: how to get the music database for my website? Pin
jschell27-Sep-17 9:28
Memberjschell27-Sep-17 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.