Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No option to create stored procedure and view ? 1

Status
Not open for further replies.

kianang

Technical User
Dec 2, 2002
23
SG
I am nee in VS Basic. NET.

The database I used is Micrsoft Access 2002 and OLEDb Jet 4.0 .

In the server Explorer , I acn browse the table , view and stored procedure. when I right clicked the view and stored proce , there is no any option for me to create view and dtored procedure ?

I refers some books, seems that only SQL can only VS.Net to do that ? Is it true

 
Any answer to this? I have the same question & have been unable to figure it out.

Thanks
 

You can create Views & Stored Procedures only in SQL Server Database via VS.NET IDE not access database.

Email: pankajmsm@yahoo.com
 

As PankajBanga says, you cannot create views and stored procedures in Access. However you can make queries, which is almost the same as views. This is independed on whether you write your database interface in vb.net or any other language.

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
OK, so I connected using SQL Server database and still I can't add a new sp. Where exactally in the VS.NET IDE do you mean? I tried through the server explorer - I can see the sp but I do not have the option to add a new one.

Thanks,
Corinne
 
Sounds like you are using either Standard or Professional editions of VS.NET. Neither support authoring SP's, views, diagrams, triggers etc.

If you need to do this kind of work, you need Enterprise version upwards.
 
You can use transact SQL (which is the method I prefer anyway). Normally you would do it through the Query analyser (part of SQL server), but you can just as well run the SQL through a command object in vb.net.
Example:
----------------------------------------------------
Try
Dim Conn As New Dim myConnection As New SqlClient.SqlConnection("SERVER=YOURSERVERNAME;User ID=xxx;Password=xxx;Initial Catalog=YOURDATABASE")
Conn.Open()
Dim Comm As New SqlClient.SqlCommand("CREATE PROCEDURE UP_MyStoredProc AS SELECT * FROM tblTest", Conn)
Comm.ExecuteNonQuery()
Conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top