How to call procedure in Java from SQL Server Database
Hello Every Body
i Have Question about
How to call procedure in Java from SQL Server Database
Thanks
Hi,
have you tried a Google search? I just gave it a 3 second try and already found: http://stackoverflow.com/questions/6113674/how-do-i-execute-a-ms-sql-server-stored-procedure-in-java-jsp-returning-table-d
Frank
Similar Messages
-
How to export an image column from SQL server to an excel
Hi team,
Would like to know how can i get an Image column storeed in SQL Server database to get copied in Excel (Hard Drive).
Requirement : Need to get Username, User email address and User photo in to an excel sheet from SQL server database.
Fix: I can get Username and Useremail adress however could not find a way to export /Copy user Image.
Please suggest
Thanks,
venkateshThis is an Oracle forum. Your question relates to SQL Server and Excel, neither of which are Oracle related.
-
How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
I tried using DROP Tables, Truncate Database, Delete and many more but it is not working. I want to delete all tables using Query Analyzer, i.e. through SQL Query.
Please help me out in this concern.
Nishith ShahInformative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
declare @TTName Table
(TableSchemaTableName
varchar
(500),
[status] int
default 0);
with AvailableTables
(TableSchemaTableName)
as
(select
QUOTENAME(TABLE_SCHEMA)
+
+
QUOTENAME(TABLE_NAME)
from
INFORMATION_SCHEMA.TABLES)
insert into @TTName
(TableSchemaTableName)
select *
from AvailableTables
declare @TableSchemaTableName varchar
(500)
declare @sqlstatement nvarchar
(1000)
while 1=1
begin
set @sqlstatement
=
'DROP TABLE '
+ @TableSchemaTableName
exec
sp_executeSQL
@sqlstatement
print
'Dropped Table : '
+ @TableSchemaTableName
update @TTName
set [status]
= 1
where TableSchemaTableName
= @TableSchemaTableName
if
(select
count([Status])
from @TTName
where [Status]
= 0)
= 0
break
end -
How can I get the data array from SQL Server Database?
Hi,
I can write a data array(2D)into a table of my SQL Server Database. The data array was writen to a column with image type. I know a data array is transformed a binary string when writing into database, but I dont know how to get the data array when I fetch the binary string from database.
My question is:
How to transform the binary string into data array? which vi's should I use? I have tried unflatten from string but failed.
Any response is appriciated.
Redhappyxh0518 wrote:
> I can write a data array(2D)into a table of my SQL Server Database.
> The data array was writen to a column with image type. I know a data
> array is transformed a binary string when writing into database, but I
> dont know how to get the data array when I fetch the binary string
> from database.
>
> My question is:
> How to transform the binary string into data array? which vi's should
> I use? I have tried unflatten from string but failed.
In order to use Unflatten from string you first need to Flatten it
before writing it. Also depending on the database driver, the returned
data may actually not be binary but Hexadecimal encoded ASCII which you
would first have to decode to binray.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Calling/starting a report from Sql Server
Hello.
I have to get a storage movement starting from a Sql Server Platform.
I found out the function BAPI_GOODSMVT_CREATE which, getting the main data from an internal
table, could create a movement in MSEG/MKPF (I suppose, I haven’t used it yet).
But if I create a report using BAPI_GOODSMVT_CREATE which gets the data from an internal table
(filled by a Sql Server table), how can I tell to Sap to execute it?
Is it the only way to schedule this report in SAP every (i.e.) 5 minutes reading if there are
data in Sql Server?
Isn’t there a “trigger” to start a report in SAP from Sql Server/Windows?Hello,
It depends on what method you use to read data i.e. Data Context class, Entity Framework for SQL-Server we can get data directly from the database easily.
The following has two very simply examples using data context classes and the same came be done with Entity Framework which has an even more powerful version of data context implementation under 6 and above
Dim db As New DataClasses1DataContext
Dim theCustomer As Customer = db.Customers.Where(Function(c) c.CustomerID = 999).FirstOrDefault
If theCustomer IsNot Nothing Then
' use theCustomer which contains all columns
Else
' do not use, customer not located
End If
Dim theCustomer1 As Customer =
From c In db.Customers
Where c.CustomerID = 999
Select New Customer With
.CompanyName = c.CompanyName,
.ContactName = c.ContactName,
.Orders = c.Orders
).FirstOrDefault
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. -
How to connect a PDF form to SQL server database through web service?
Hi,
I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
I really appreciate your help and advice.Hi,
I'm new to LiveCycle designer. I have designed a PDF form in LC designer ES2, which suppose to take a personnel number and retrieve the personnel information from a SQL server database. Currently its working fine with XML data and a search button, but I need to securly connect to a database through web service. I know how to connect to a wsdl file through designer. What I need is a wsdl file to connect the form to database. For this purpose, is there any WSDL code to use as the web service?
I really appreciate your help and advice. -
Connect & transfer data from SQL Server Database
Hi all,
I would like to connect to MS SQL Server Database and transfer data from the data stored in the SQL Server Database tables into Oracle Tables.
How should I go about doing this ?
P.S.: I am using Oracle 11g and SQL Server 2005
Message was edited by:
MonkWhat operating system is your Oracle database running on?
If you're running Oracle on Windows, you can use Heterogeneous Services and Generic Connectivity along with the Microsoft SQL Server ODBC driver to create a database link from Oracle to SQL Server. If you're running Oracle on something other than Windows, you can do the same thing, but you would generally need to license either a third party ODBC driver or one of the Oracle Transparent Gateway products.
Justin -
Retrieving Data from SQL Server Database
Hi All,
I am working with a program in which i have a requirement to connect to SQL Server Database
and extract the data from the SQL Server Database. I am able to connect to the SQL Database but i am facing problem with the Select Statement. I have the Select Statement
Select PARTNRID from GBA_SI.TRACKING and REFERENCEID3 from HEADER where TRANSTYPE = "INVOIC" and WICOMPLETEDDATETIME is within the date range specified in selection screen (Join on TRANSID).
Can any one tell me how to write the Select Statement in ABAP for retrieving the data from the SQL Server Database.
Regards,
Sudhirhi check this..
data: begin of itab occurs 0,
PARTNRID like GBA_SI-PARTNRID,
end of itab .
data: begin of itab1 occurs 0,
TRANSID like header-TRANSID,
TRANSTYPE like header-TRANSTYPE ,
REFERENCEID3 like header-REFERENCEID3,
end of itab1 .
select-options:s_PARTNRID for GBA_SI-PARTNRID ,
s_date for sy-datum.
Select PARTNRID
from GBA_SI
into table itab
where PARTNRID in s_PARTNRID.
select TRANSID
TRANSTYPE
REFERENCEID3 from HEADER
into table itab1
for all entries in itab
where TRANSID = itab-PARTNRID
and TRANSTYPE = "INVOIC"
and WICOMPLETEDDATETIME in s_date .
regards,
venkat appikonda -
Exporting data from SQL Server database to Oracle database
Hello All,
We need to replicate a table's data of SQL Server database to Oracle database.
Can this task be accomplished using Import/Export wizard or Linked servers?
Can help me regarding which Oracle data access components should i download to do this?
I am using SQL Server 2012.
And i have Oracle 11g release 2 client installed in my system.
Thanks in Advance.
Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.Yes you can definitely transfer data from SQL server to Oracle Have a look at below links
Export SQL server data to Oracle Using SSIS
Use OLEDB data provider to transfer data from SQL server to Oracle
Using Import Export Wizard
Similar thread
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 -
RickTextbox - getting and saving the text to and from SQL server database
I have no trouble saving the data to an SQL Server database. Here is a sample of what is saved.
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 testing the\par
rich\par
text box\par
when I retrieve the text from the database, I end up with exactly what is shown above. I am retrieving the text with a SqlDataReader. here is the code that I am using;
while (sqlDataReader.Read())
string special_Instructions = ""; //first I was using this line but both lines have the same result // special_Instructions = sqlDataReader["Special_Instructions"].ToString();
special_Instructions = sqlDataReader.GetString(5);
special_InstructionsRichTextBox.Rtf = special_Instructions;
any guidance or help will be greatly appreciated.
daveMichael,
Lets begin with, 'Thanks for your guidance'. With your last run of questions, I was able to figure it out.
Here is what I learned, (by the way, this is in Winforms):
When I checked the properties of the RichTextBox control, I saw and then remembered that the control was bound to the form. First thing I did was comment out the code I was using (above) to fill the control and tested the program. I actually
received the same issue with the contents of the control as before.
I then dropped a new RichTextBox control from the tool box to my form and positioned it next to the original control. I un commented the above code and used it to fill the new
richTextBox1.Rtf and ran the program. The original control that was bound to the form still gave the incorrect result but the new control worked perfectly.
I hope this helps others and Thanks again for your guidance. If there is anything else you think could be added to this reply please let me know.
dave -
How to copy procedures and packages from one server to another?
Hi,
I have 439 packages and 178 procedures located in one server called MAXWELL.
I need to copy these objects to another server called TITAN.
The schema names is SPCBR in both servers.
So both servers have an instance running with this schema SPCBR.
SPCBR in TITAN server has their tables with table data which was generated by an export/import process from MAXWELL server.
However, procedures and packages were not copied by the export/import because I used the clause 'tables'.
Now, what can I do in order to equalize procedures and packages in both databases? I can't risk in damaging or duplicating data in my database located in TITAN server, ok?
Thanks,Another simple alternative, according to AskTom (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:454220160386)
---------------- getcode.sql ----------------------------
set feedback off
set heading off
set termout off
set linesize 1000
set trimspool on
set verify off
spool &1..sql
prompt set define off
select decode( type||'-'||to_char(line,'fm99999'),
'PACKAGE BODY-1', '/'||chr(10),
null) ||
decode(line,1,'create or replace ', '' ) ||
text text
from user_source
where name = upper('&&1')
order by type, line;
prompt /
prompt set define on
spool off
set feedback on
set heading on
set termout on
set linesize 100
------------------- eof --------------------------------
it extracts one procedure, function or package to a file. Thats it. If you
wanted to get all of the procedures in a schema extracted to the current working
directory, you would run a script:
--------------- getallcode ---------------------------
set termout off
set heading off
set feedback off
set linesize 50
spool xtmpx.sql
select '@getcode ' || object_name
from user_objects
where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
spool off
spool getallcode_INSTALL.sql
select '@' || object_name
from user_objects
where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
spool off
set heading on
set feedback on
set linesize 130
set termout on
@xtmpx.sql
---------------- eof ---------------------------------
You can see how to filter on that one by adding to the where clause if you want.
Just run @getallcode_INSTALL to run all of the scripts... -
Error when calling a XI-webservice from SQL-Server 2005
Hi all,
we have published a webservice with XI 7.0 (using the SOAP-Adapter) and try to call it from a stored procedure within SQL-Server 2005. Upon execution we receive the error
"<SAP:Code area="MESSAGE">EMPTY_HTTP_REQUEST_RECEIVED</SAP:Code>" and
"<SAP:Stack>Empty HTTP query received; message processing not possible </SAP:Stack>".
We are using the dll MSXML2.ServerXMLHTTP. The webservice is available and can be reached from other tools like SOAP-UI when using the same endpoint-URL. It is also possible to call the service from Visual-Basic using the same code.
Does anyone has any clue about what's causing this error?
Thanks in advance!It is clear that, PI service is working absolutely fine and the problem is calling it in your SP. I do not think you are calling a web service but actually sending a HTTP request to the server. An HTTP request and a SOAP call are different in terms of protocol. You would need to explore more on how to call web services from SQL SPs.. and the right place to search would be MS SQL Server Forums..!!
VJ -
How to access the MDX application from SQL server when working with OBIEE?
Hi,
I am new to MS SQL Server 2005. We have developed the OLAP Cubes on SQL Server Business Intelligence Development Studio with its integration with Oracle Business Intelligence Enterprise Edition (OBIEE).
The backend query is in MDX language. Now if I need to run that query I need to access the MDX Application, rite?
So need to know how to connect to MDX application.
Regards,Administration Tool: File - Import - "from multidimensional". There you choose "Provider Type" = "Analysis Server 2005". You specify the URL, user name and password. Then you can import MSAS cubes just like Essbase ones.
Cheers -
How can I export image column from SQL Server 2000
Hi everybody,could someone tell me how can I export an entire column( pictures type) to a folder on disk?I've tried the textcopy.exe under the SQL installation's binn folder,it can only export one picture a time,I'm trying to find an automated way to export
the whole colum's images to a folder,I'm using SQL Server 2000.Vishal,thanks for the replay,I've tried the BCP method but it seems does not work on my Sql Server 2000,also the SSIS package method is demonstrated with Sql Server 2008 R2 and my machine does not have the visual application to try it.In the BCP method,I
got prompt indicating me that I wrote something wrong in the grammer,and I'm pretty sure that maybe I made something wrong in the below part,the grammer makes me confused
INSERT
INTO @sqlStatements
SELECT 'BCP "SELECT Photograph_Data FROM [ALBSCH_Trial].[dbo].[Photograph] WHERE Photograph_ID = '''
+ CAST(Photograph_ID AS VARCHAR(500)) + '''" queryout ' + @OutputFilePath
+ CAST(Photograph_ID AS VARCHAR(500)) + '.jpg -S localhost\SQLEXPRESS2008 -T -f C:\SQLTest\Images.fmt'
FROM dbo.Photograph -
How to access the MDX application from SQL server?
Hi,
I am new to MS SQL Server 2005. We have developed the OLAP Cubes on SQL Server Business Intelligence Development Studio with its integration with Oracle Business Intelligence Enterprise Edition (OBIEE).
The backend query is in MDX language. Now if I need to run that query I need to access the MDX Application, rite?
So need to know how to connect to MDX application.
Regards,I think that you have posted this query to the wrong forum. Try this one:
Business Intelligence Suite Enterprise Edition
--Andy
Maybe you are looking for
-
How to insert a specific record into alv
Hi everyone, here is my problem: I put an ALV GRID control in my screen , it display some records. and I create a new button on the toolbar, and in the "handle user command class" , I need to select a record from DB table into a work area.
-
Hi All, I have a scenario and two solutions for it. Please give me the input for which is a better solution and why. Scenario - Approver have to either Approve/ Reject a particular request made. The user decision has to come from Java front end and
-
Problem with right speaker (W510 model)
Hi All, The right internal speaker doesn't work. Left speaker is ok. I installed latest updates from Lenovo web site via Lenovo ThinkVantage Website. Also, I installed latest updates for Windows 7. But I got the same problem. Anybody meets with such
-
HT201232 Manually manage music and video
I recently purchased a new iPhone 6 and needed to reload all of my music and videos back on the phone. I have always selected the check box manually manage music and videos. For the music this worked great. However, for the videos I cannot move any v
-
Upload files from abap to portal
Hi, I need to upload files (PDF) from Abap (R/3) to SAP Portal (into knowledge management). I found 2 functions but I don't know if they serve to me: BDS_BUSINESSDOCUMENT_CREATEF SDOK_PHIO_STORE_CONTENT Somebody can help me? Thank you!! Marc