User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 391,596 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,670 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser:
Views: 636 | Replies: 5
Reply
Join Date: Mar 2008
Posts: 10
Reputation: chrisdent1986 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
chrisdent1986 chrisdent1986 is offline Offline
Newbie Poster

Creating an interface for oracle

  #1  
Apr 28th, 2008
Hi everyone. Sorry if this question is in the wrong area..I posted it on the VB forum and they advised me to post here also.

I have created a visual basic system that is connected to an oracle database.

(I connected through data>Add New Data source>New Connection>Oracle Database etc etc)

I am using the system to create new oracle users with passwords etc.

I have a form called frmAdd and text boxes txtUser and txtPassword

The user of the system will input into txtUser the username they wish to create (eg user1) and then their password (eg password)

they will then click the cmdAdd button.

I wish to send the following command to the oracle databse when they click the button

Create user (txtUser.text)
Default Tablespace users
identified by (txtPassword.text)


There are a lot of other commansd I need to do but I'm sure I can manage it myself after I get help with this one.

Could someone tell me how to go about this please. As it's for a university assignment that needs to be handed in next week.

Regards

Chris
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Posts: 51
Reputation: Nige Ridd is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 9
Nige Ridd Nige Ridd is offline Offline
Junior Poster in Training

Re: Creating an interface for oracle

  #2  
Apr 29th, 2008
Have a look at http://www.a1vbcode.com/snippet-3876.asp, it's not my code so i can't validate if it works, but best just to try it.
Nige
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,134
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 10
Solved Threads: 257
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Creating an interface for oracle

  #3  
Apr 30th, 2008
Originally Posted by Nige Ridd View Post
Have a look at http://www.a1vbcode.com/snippet-3876.asp, it's not my code so i can't validate if it works, but best just to try it.
Nige

Well you have small problem there and that is -> chrisdent1986 used VisusalStudio wizard to get his connection string, where code provided by you is custom coding of a programmer that want to avoid drag&drop approach (which is my personal preference)
What you need to do is:
  1. in Data Sourcesclick on Edit DataSet with Designer
  2. right click(in lower part) on table you wish to use (as seen on attached screenshot)
  3. select Add >> Query and follow wizard
  4. Create new stored procedure >> Insert
  5. if you know SQL you can simply type your query or use Query Builder (view of QB on screenshot)
  6. Next >> and just follow wizard and make changes to names as neccesary
that should do the magic
Attached Images
File Type: png new_query.png (16.4 KB, 3 views)
File Type: png querybuilder.png (15.2 KB, 1 views)
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,213
Reputation: debasisdas is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 78
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Nearly a Posting Virtuoso

Re: Creating an interface for oracle

  #4  
Apr 30th, 2008
try to execute the commands with EXECUTE IMMEDIATE .
Share your Knowledge.
Reply With Quote  
Join Date: Nov 2007
Posts: 51
Reputation: Nige Ridd is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 9
Nige Ridd Nige Ridd is offline Offline
Junior Poster in Training

Re: Creating an interface for oracle

  #5  
Apr 30th, 2008
Sorry - I thought this person wanted to create Oracle users, this isn't a case of adding a record to a table, it's more a case of executing various DDL statements to create the user, assign default tablespaces and grant permissions to allow them to do simple things like connect to a database.
Nige
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,134
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 10
Solved Threads: 257
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Creating an interface for oracle

  #6  
Apr 30th, 2008
To me it was random school assignment when they need to access DB and do something, will see what chrisdent1986 says when he eventualy find his way back to daniweb
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Oracle Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Oracle Forum

All times are GMT -4. The time now is 11:40 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC