pg.ddx.io  pgsql-students@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem accessing View in VB6
6+ messages / 2 participants
[nested] [flat]

* Problem accessing View in VB6
@ 2008-08-09 14:15  oca@mvc.edu.ph
  0 siblings, 0 replies; 6+ messages in thread

From: oca@mvc.edu.ph @ 2008-08-09 14:15 UTC (permalink / raw)
  To: pgsql-students



   hi,

   I got problem accessing views in Visual Basic 6. 

   Dim rsSchedule As New Recordset
With rsSchedule
    .Open "SELECT * FROM tvwClassSchedules", dbConn, adOpenDynamic,  
adLockReadOnly
    .Close
End With

   I got this error:

   ERROR: relation "tvwClassSchedules" does not exist;
Error while executing the query

   this view exist because i can use the view in pgAdmin to display  
the records.

   please help.

   thank you,
ocavid

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Problem accessing View in VB6
@ 2008-08-09 14:15  oca@mvc.edu.ph
  0 siblings, 1 reply; 6+ messages in thread

From: oca@mvc.edu.ph @ 2008-08-09 14:15 UTC (permalink / raw)
  To: pgsql-students



   hi,

   I got problem accessing views in Visual Basic 6. 

   Dim rsSchedule As New Recordset
With rsSchedule
    .Open "SELECT * FROM tvwClassSchedules", dbConn, adOpenDynamic,  
adLockReadOnly
    .Close
End With

   I got this error:

   ERROR: relation "tvwClassSchedules" does not exist;
Error while executing the query

   this view exist because i can use the view in pgAdmin to display  
the records.

   please help.

   thank you,
ocavid

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem accessing View in VB6
@ 2008-08-09 15:46  Andrew Dunstan <andrew@dunslane.net>
  parent: oca@mvc.edu.ph
  0 siblings, 1 reply; 6+ messages in thread

From: Andrew Dunstan @ 2008-08-09 15:46 UTC (permalink / raw)
  To: oca@mvc.edu.ph; +Cc: pgsql-students



oca@mvc.edu.ph wrote:
>
> hi,
>
> I got problem accessing views in Visual Basic 6. 
>
> Dim rsSchedule As New Recordset
> With rsSchedule
>     .Open "SELECT * FROM tvwClassSchedules", dbConn, adOpenDynamic, 
> adLockReadOnly
>     .Close
> End With
>
> I got this error:
>
> ERROR: relation "tvwClassSchedules" does not exist;
> Error while executing the query
>
> this view exist because i can use the view in pgAdmin to display the 
> records.
>
>

If that is really the name of the view then the name needs to be quoted 
in double quotes. Postgres folds unquoted names to lower case.

cheers

andrew



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem accessing View in VB6
@ 2008-08-09 16:22  oca@mvc.edu.ph
  parent: Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 1 reply; 6+ messages in thread

From: oca@mvc.edu.ph @ 2008-08-09 16:22 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-students


----- Message from andrew@dunslane.net ---------
     Date: Sat, 09 Aug 2008 11:46:18 -0400
     From: Andrew Dunstan <andrew@dunslane.net>
Reply-To: Andrew Dunstan <andrew@dunslane.net>
  Subject: Re: [pgsql-students] Problem accessing View in VB6
       To: oca@mvc.edu.ph
       Cc: pgsql-students@postgresql.org


>
>
> oca@mvc.edu.ph wrote:
>>
>> hi,
>>
>> I got problem accessing views in Visual Basic 6. Dim rsSchedule As   
>> New Recordset
>> With rsSchedule
>>    .Open "SELECT * FROM tvwClassSchedules", dbConn, adOpenDynamic,   
>> adLockReadOnly
>>    .Close
>> End With
>>
>> I got this error:
>>
>> ERROR: relation "tvwClassSchedules" does not exist;
>> Error while executing the query
>>
>> this view exist because i can use the view in pgAdmin to display   
>> the records.
>>
>>
>
> If that is really the name of the view then the name needs to be quoted
> in double quotes. Postgres folds unquoted names to lower case.
>
> cheers
>
> andrew
>
> -- 
> Sent via pgsql-students mailing list (pgsql-students@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-students


----- End message from andrew@dunslane.net -----

Thank you, that does the job, but i guess i have to use lowercases for  
my views names.

oscar





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem accessing View in VB6
@ 2008-08-09 17:31  Andrew Dunstan <andrew@dunslane.net>
  parent: oca@mvc.edu.ph
  0 siblings, 1 reply; 6+ messages in thread

From: Andrew Dunstan @ 2008-08-09 17:31 UTC (permalink / raw)
  To: oca@mvc.edu.ph; +Cc: pgsql-students



oca@mvc.edu.ph wrote:
>
>
> Thank you, that does the job, but i guess i have to use lowercases for 
> my views names.
>
>

I don't see why. Just use:

    .Open "SELECT * FROM ""tvwClassSchedules""", dbConn, adOpenDynamic,  
adLockReadOnly


AFAIK that is the way to embed quotes in VB Strings.

cheers

andrew



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Problem accessing View in VB6
@ 2008-08-09 22:09  oca@mvc.edu.ph
  parent: Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 0 replies; 6+ messages in thread

From: oca@mvc.edu.ph @ 2008-08-09 22:09 UTC (permalink / raw)
  To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-students



   ----- Message from andrew@dunslane.net ---------
    Date: Sat, 09 Aug 2008 13:31:54 -0400
    From: Andrew Dunstan <andrew@dunslane.net>
Reply-To: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: [pgsql-students] Problem accessing View in VB6
      To: oca@mvc.edu.ph
      Cc: pgsql-students@postgresql.org

>
>
> oca@mvc.edu.ph wrote:
>>
>>
>> Thank you, that does the job, but i guess i have to use lowercases   
>> for my views names.
>>
>>
>
> I don't see why. Just use:
>
>     .Open "SELECT * FROM ""tvwClassSchedules""", dbConn, adOpenDynamic,
> adLockReadOnly
>
>
> AFAIK that is the way to embed quotes in VB Strings.
>
> cheers
>
> andrew
>
> -- 
> Sent via pgsql-students mailing list (pgsql-students@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-students[1]
----- End message from andrew@dunslane.net -----

   yes, but i guess it would be more easier for me to code when they  
are in lower cases, i just rename the views to tvw_class_scedules.

   thank you and have a great day!



Links:
------
[1] http://www.postgresql.org/mailpref/pgsql-students

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2008-08-09 22:09 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-09 14:15 Problem accessing View in VB6 oca@mvc.edu.ph
2008-08-09 14:15 Problem accessing View in VB6 oca@mvc.edu.ph
2008-08-09 15:46 ` Andrew Dunstan <andrew@dunslane.net>
2008-08-09 16:22   ` oca@mvc.edu.ph
2008-08-09 17:31     ` Andrew Dunstan <andrew@dunslane.net>
2008-08-09 22:09       ` oca@mvc.edu.ph

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox