Showing posts with label engine. Show all posts
Showing posts with label engine. Show all posts

Wednesday, March 28, 2012

Newbie question about importing db into SQL Server

Relatively new to SQL, will be using it as the engine for a dynamic website...I have a database in Access that is the foundation for this site -- it's pretty simple, just a few tables with relationships established & a couple of queries.

Is there a tool that can migrate this Access db into SQL, or should I just reconstruct it? Been looking around for some tech notes and have been unsuccessful so far. Thanks in advance! -ValerieI'd suggest the Access Upsizing Wizard (http://support.microsoft.com/default.aspx?scid=kb;en-us;330468).

-PatP|||Thanks! ...you'd think that would pop up in Access Help, you know? Harumph. -vsql

Wednesday, March 21, 2012

newbie pl/sql outputs select results

Hi,
I want to write a PL/SQL search engine that does some complex checking of various tables for a client's website. I could write it all in a PHP $sql = "SELECT ..." but I want to put it the sql into PL/SQL and am having trouble figuring out how PL/SQL outputs results.

Basically, I want to call the procedure with some keywords and have it return the results. Something like this:

create package jonsearch is

procedure getrecords(kw IN varchar, results OUT ?) is
begin
--complex sql goes here
end;

end jonsearch;

jonsearch.getrecords("keywords") would return the results just like select * from table would return results.

My trouble is that every tutorial I have read relies on dbms_output.put_line to output data. I want to output the results as a set, with an output variable, but I can't find a tutorial that shows how to use output variables.

Any help, even pointing me to a tutorial, would be great.

thanks,

JonIt turns out what I was looking for is called a REF CURSOR. I needed to create a package that defines this reference cursor, and then use that as my output variable.

This is described here, if anyone is interested:

http://www.oracle-base.com/Articles/8i/UsingRefCursorsToReturnRecordsets.asp|||Not understanding...

How are you wanting to output the variables? If you want to simply return the values, you will use the DBMS_OUTPUT package. If you are returning to Apache through the modplsql module, you will use the HTP and HTF packages.

As to REF Cursors, here is a Reader's Digest version:

http://www.dbforums.com/t974133.html

JoeB

Monday, March 19, 2012

Newbie needs help

I set up the MS SQL Desktop server engine on my computer.
I successfully set up a database and the table structure using a query
utility. My Visual Studio logs in to the server using a system account that
magically exists.

but...

I can't make my web application log in to the database. I can't configure
the connection string to connect. I can't figure out how to create new
authorized user accounts that might work either. The SQL desktop engine is
a black box.

I'm stuck. How do you work this thing?

Bob

--== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==--
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
--= East and West-Coast Server Farms - Total Privacy via Encryption =--Robert Dickow wrote:
> I set up the MS SQL Desktop server engine on my computer.
> I successfully set up a database and the table structure using a
query
> utility. My Visual Studio logs in to the server using a system
account that
> magically exists.
> but...
> I can't make my web application log in to the database. I can't
configure
> the connection string to connect. I can't figure out how to create
new
> authorized user accounts that might work either. The SQL desktop
engine is
> a black box.
> I'm stuck. How do you work this thing?
> Bob
> --== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==--
> http://www.newsfeeds.com The #1 Newsgroup Service in the World!
120,000+ Newsgroups
> --= East and West-Coast Server Farms - Total Privacy via Encryption
=--

---------
Dim lsConn ' ConnectionString for database
Dim ladoConn ' Database connection

' Server connection
lsConn = "Provider=sqloledb;" + _
"Data Source=<ServerName>;" + _
"Database=<DatabaseName>;" + _
"UID=<UserID>;" + _
"PWD=<Password>"

' Connect to the database
Set ladoConn = CreateObject("ADODB.Connection")
ladoConn.Open(lsConn)
---------

HTH
--
David Rowland
http://dbmonitor.tripod.com