Skip to content

Commit

Permalink
Added support for specifying the database name for table in a SELECT …
Browse files Browse the repository at this point in the history
…statement. Closes #36.
  • Loading branch information
hisystems committed Mar 22, 2012
1 parent 2819d2c commit abd5b34
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SQL/Select/SQLSelectTable.vb
Expand Up @@ -14,6 +14,7 @@ Namespace SQL
Public Class SQLSelectTable
Inherits SQLSelectTableBase

Private pstrDatabaseName As String
Private pstrSchemaName As String
Private pstrName As String

Expand All @@ -34,6 +35,20 @@ Namespace SQL

End Sub

Public Property DatabaseName As String
Get

Return pstrDatabaseName

End Get

Set(value As String)

pstrDatabaseName = value

End Set
End Property

Public Property SchemaName As String
Get

Expand Down Expand Up @@ -85,6 +100,10 @@ Namespace SQL

Dim strSQL As String = String.Empty

If pstrDatabaseName <> String.Empty Then
strSQL &= SQLConvertIdentifierName(pstrDatabaseName, eConnectionType) & "."
End If

If pstrSchemaName <> String.Empty Then
strSQL &= SQLConvertIdentifierName(pstrSchemaName, eConnectionType) & "."
End If
Expand Down

0 comments on commit abd5b34

Please sign in to comment.