sql views

B

Bre-x

Hi
We are using MS Access 2000

I need to send to a pervasive sql server the following sql commands

drop VIEW vw_test;

Create View vw_test As
SELECT BKAR_CUSTCODE, BKAR_CUSTNAME FROM "BKARCUST";

Any ideas?

Thank you,

Bre-x
 
B

Bre-x

This seems to do the trick

Function CreateView()
'Declare all necessary ADO objects
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim sqlString As String
'Open connection
cn.ConnectionString = "DSN=UMCClientDB"
cn.Open
'Set up Stored Procedure for execution
cmd.ActiveConnection = cn
sqlString = "Create View RON_GL As SELECT * FROM BKGLTRAN where
BKGL_TRN_GLDPT = 'UMC' AND BKGL_TRN_GLACCT = '1355'"
cmd.CommandText = sqlString
cmd.Execute
cn.Close
Set cmd = Nothing
Set cn = Nothing
End Function
 
V

Van T. Dinh

That's about how I would do it.

If I read your first post correctly, ALTER VIEW would be the way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top