Click here to Skip to main content
14,926,738 members
Home / Discussions / Database
   

Database

 
GeneralRe: GUID or long for MVC site Pin
k505418-Oct-17 5:30
mvek505418-Oct-17 5:30 
GeneralRe: GUID or long for MVC site Pin
jschell20-Oct-17 8:34
Memberjschell20-Oct-17 8:34 
AnswerRe: GUID or long for MVC site Pin
Eddy Vluggen17-Oct-17 23:38
professionalEddy Vluggen17-Oct-17 23:38 
AnswerRe: GUID or long for MVC site Pin
Gerry Schmitz18-Oct-17 18:32
mveGerry Schmitz18-Oct-17 18:32 
QuestionInserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14313-Oct-17 12:59
Memberindian14313-Oct-17 12:59 
AnswerRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
jschell15-Oct-17 8:15
Memberjschell15-Oct-17 8:15 
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14315-Oct-17 15:03
Memberindian14315-Oct-17 15:03 
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
indian14316-Oct-17 7:25
Memberindian14316-Oct-17 7:25 
Now when I try to use OpenQuery as below, it gives me the error message as below:
Select * from OPENQUERY([MySQLServer], 
    'EXEC xxxx.[GL].[PopulateStageRpt129_New] @ReportId=''1-085''
    , @filepath=''Database=\\xxxxxx\User.Developed.Reports\HPXR\1-085 Cancelled with Cash-Report 129_2017-10-09.xls''
    , @sheetname=''[Sheet1$]''
    , @providername=''Microsoft.ACE.OLEDB.12.0''
    , @providerversion=''Excel 12.0''')

Error message
The metadata could not be determined because statement 'exec (@selectquery)' in procedure 
'PopulateStageRpt129_New'  contains dynamic SQL.  
Consider using the WITH RESULT SETS clause to explicitly describe the result set.

And when I use the ColumnNames as below in the query
Select * from OPENQUERY([WSQL569S], 
    'EXEC Saw_Raw.[GL].[PopulateStageRpt129_New] @ReportId=''1-085''
    , @filepath=''Database=\\bsc\cscm\IM_PHI\Facets_Team\User.Developed.Reports\HPXR\1-085 Cancelled with Cash-Report 129_2017-10-16.xls''
    , @sheetname=''[Sheet1$]''
    , @providername=''Microsoft.ACE.OLEDB.12.0''
    , @providerversion=''Excel 12.0''
    WITH RESULT SETS ([Category]
      ,[Line_of_Business_ID]
      ,[Line_of_Business]
      ,[Delinquent_Definition]
      ,[Subscriber_ID]
      ,[Last_Name]
      ,[First_Name]
      ,[Group_ID]
      ,[Subgroup_ID]
      ,[Class_ID]
      ,[Paid_within_Tolerance]
      ,[Elig_Thru_Dt]
      ,[Created_End_Date]
      ,[Outstanding_Balance]
      ,[Receipt_Payment_Type]
      ,[Date_Posted]
      ,[UNREC_Cash]
      ,[Payment_Due_Date]
      ,[PNC_Generated]
      ,[Cancel_Reason_Code]
      ,[ReportId])'
    )

It is giving me the error as below:
OLE DB provider "SQLNCLI11" for linked server "WSQL569S" returned message "Deferred prepare could not be completed.".
Msg 8180, Level 16, State 1, Line 1
Statement(s) could not be prepared.
Msg 102, Level 15, State 1, Line 6
Incorrect syntax near 'Category'.

I want to somehow get the column names of the stored procedures I am trying all the options anything that can help me is going to be very helpful. Thanks in advance my friends.

Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."

-- modified 16-Oct-17 13:54pm.
GeneralRe: Inserting the values of a Stored Procedure directly into a Table by using the Column names Pin
Eddy Vluggen17-Oct-17 2:14
professionalEddy Vluggen17-Oct-17 2:14 
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 
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 

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.