Archive

Archive for the ‘DAZ3D’ Category

3D ART: A Night In the Desert

A Night In The Desert

In the still of the night. Yeah, I know an old song title. However, I’d like to find a place where you can still hear nature and see the stars with eyes of wonder.

“To find the universal elements enough; to find the air and the water exhilarating; to be refreshed by a morning walk or an evening saunter… to be thrilled by the stars at night; to be elated over a bird’s nest or a wildflower in spring – these are some of the rewards of the simple life.”
John Burroughs

Enjoy 🙂

Joseph

3D ART :- Stay The Course For Family and Friends

3D ART :- Stay The Course For Family and Friends

“I declare to you that woman must not depend upon the protection of man, but must be taught to protect herself, and there I take my stand.”
Susan B. Anthony

I shall protect my children and my children’s children.

I shall protect my children and my children’s children.  We must stay vigilant and aware of our surroundings at all times.  Even when relaxing keep an eye open. Because we still must enjoy life and not be afraid that terrorists might live in the neighborhood.

I shall protect my children and my children’s children.

I shall protect my children and my children’s children.

Joseph

3D ART :- Never Stop Reaching

I’ve been a long time fan of Robert Browning’s work and this is one of my favorite quotes from his collection.

“Ah, but a man’s reach should exceed his grasp, Or what’s a heaven for?” Robert Browning

A quote by me. “Stung by imaginations melded glory, pulled and connected life’s odd demeanor. As I alone amongst the stars grasp at life’s curiosities”… #kravis

So many people give up with each small obstacle they face. Those small obstacles add up if you don’t deal with them appropriately on your way to the big picture dream.  I use to count myself in with that group of people. However, I’ve always been dreaming and I’ve been grasping and reaching. I’m still trying and will never give up!

My commitment is to Self in order to become a better me for you. 🙂

Joseph

3D ART :- Porcelain I’m Fragile

3D ART :- Porcelain I’m Fragile

If we’re so fragile we’ll never know or have the opportunity to expand and grow. Using downtime for quite reflection can help
achieve many wondrous things. The ability to understand and work on our frailties is something we all need.  I’m learning
that it’s OK to make mistakes, learn from it and move on. Wishing the same for you as well.

“I love those who can smile in trouble, who can gather strength from distress, and grow brave by reflection. ‘Tis the business of little minds to shrink, but they whose heart is firm, and whose conscience approves their conduct, will pursue their principles unto death.”
Leonardo da Vinci

3D ART :- In The Park

3D ART :- In The Park

Spring brings out all the flowers.

“The beauty of a woman must be seen from in her eyes, because that is the doorway to her heart, the place where love resides.”
Audrey Hepburn

SQL :- Many Flavors (PostGreSQL).

SQL :- Many Flavors (PostGreSQL).

Recently I installed PostGreSQL on windows so, I can work on a little project that I’ve been wanting to do.  The objective was to learn PostgreSQL and since I’ve started to dig into the free software DAZ Studios (DAZ3D) I wanted a better understanding of the data in the tables and wanted to be able to learn various configurations of PostgreSQL,
By default DAZ Studio installs pgAdmin3 LTS as the graphical interface manager. But, there is a new pgAdmin4 1.4 that I’ll eventually be switching too for viewing data tables.  For now as pgAdmin30 is out I’ll use that for this article mainly because that’s what DAZ Studio utilizes.  After all items are connected I’ll show you how to create  external  connections via ODBCmanager for 32bit and 64bit connections. With those connections, I’ll show you how to connect to Excel and SSRS reporting. I’m keeping the examples short for now and in the future I will be posting more complex ideas and samples of how to work with the data to enhance more control over content management.

Installed PostgreSQL By DAZ

It is not necessary to actually download PostgreSQL as DAZ Studio installs a version in to the default setup as in the below image. I won’t go over DAZ Studio setup here.

And, to run the PostgreSQL graphical interface program you can select the pgAdmine3.exe

Download and Install PostgreSQL

If you want more power then what the DAZ studio installed version you can download
and install from here.

DAZ STUDIO CMS Version

Once you get here with your installation or DAZ defaults, you will need to connect PostgreSQL to your DAZ content database. From within DAZ studio you can find the
default port that DAZ Studio has used for setup. I’ve kept things at the default but you can change to suit your environment.
To get the port number to use for PostgreSQL for DAZ Studio select Edit preferences or “F2”. Select the CMS Settings tab and you’ll see the installation folder and the Port number that daz uses to communicate with the database.

To connect PostgreSQL to DAZ Studio I’ll keep the default port at 17237.
Although I’ve already connected to DAZ3D CMS database in this image, the application displayed should look like this.

Next we will want to add a new server in this case is 127.0.0.1 which is the local machine.

Fill out the values like this. If you want a password on the database you can add one here.
I named my Server “MyDaz” and used the user name of “dzcms” a name to use that I found
on DAZ3d forums.

After setup if you’re not familiar with PostgreSQL make sure you use DAZ Studio Interface to backup your database.

DAZ Studio Query Tables

To show connectivity is working I’ll show you a couple quick methods for displaying data from within tables without major coding. 🙂
From the PostgreSQL interface you can choose to view rows

Selected Content Table Rows (100 rows) is the default. On real large databases you’ll want to limit the number of results returned.

And, you want to select rows it’s similar with a slightly different interface. Select the “Select Script”

Just a few ways to query the data in the tables.

PostgreSQL ODBC Driver Installation

To access PostgreSQL form other windows applications you will need to install ODBC drivers  for PostgreSQL for both 32/64bit versions.

You can find them at https://odbc.postgresql.org/
And since I’m running 64bit windows I’ll just download the MSI version for now and the 32bit if required.  And, I’ve downloaded the code so I can see how it is constructed.  https://www.postgresql.org/ftp/odbc/versions/msi/ get both
Psqlodbc_09_06_0200-x86.zip and Psqlodbc_09_06_0200-x64.zip as I’ve noticed that some apps that I’ve tried to connect with like 32bit versus the 64bit version.

Download and virus checked.  And, unzipped into a folder. Always read the readme file.
PSQLODBC.DLL – A library to talk to the PostgreSQL DBMS using ODBC.

ODBC Setup Screens

Select Next

Select Check BOX- Select Next

Select to install documentation or just select next.

Select Install

After installation complete select Finish.

Both installations for 32/64bit follow the same installation and setup style.

Create DSN for ODBC driver assocation

You can search for this “What is a DSN (Data Source Name)?” or go to this link https://support.microsoft.com/en-us/help/966849/what-is-a-dsn-data-source-name
further explanation of what a “DSN” name is.

From windows “RUN” type the following for 64BIT  DSN creation.

I chose Unicode for my DSN.

From windows “RUN” type the following for 32BIT  DSN creation.

When you select finish you can create your DSN name that will be used in other applications.

The name of the database is defined when you connect using pgAdmin3. The ports, server name and user name are the same as used

for PostgreSQL database attachment.

You can actually create this with corresponding names based on 32/64bit naming conventions.

Using “DSN” created in Excel

After you open up a new sheet in Excel, select item “From Other Sources” located on the “Data Tab”

We can select the “From Data Connection Wizard” and from there select the ODBC DSN.

Select next after ODBC DSN

What is nice about this method we get a list of tables that we can work with.

Joseph Kravis

Select a table

Choosing next gives us this screen.

Review make adjustments if needed and select Finish

You can paste into existing sheet or create a new sheet.

 

As this isn’t really a tutorial on using Excel, I thought I might add that you can sort columns filter and organize

And, by filtering you can see what purchases you made for a given date much faster then having to track this down.

Column Filter By Date

Using “DSN” Created in SSRS

Not many people have SSRS or the desire to create reports with SSRS. This isn’t a full blown tutorial on using SSRS, but on

creation of the data sources. Either Shard Data Sources or Shared Data Sets and using those to connect the DSN for reporting

from DAZ Studios CMS database.

After opening up Visual Studio I’m using 2013 here. right click on Shared Data Sources

Create a name for your Shared Data Source with type as ODBC, then select edit.

Select the PostgreSQL30_32 item after testing the connection select OK.

Your connection string will be “Dsn=PostgreSQL30_32”  Select OK on the Shared Data Source Properties screen.

I’ll create a new report.

Select the newly created “Shared Data Source” and select next. If you have a query

already created and is syntax checked enter that as your query string.  You can select next or

enter the query builder where if there are errors will show you.

Product ‘4422’ is one that I’ve been using in my postings about DAZ3d Content Management. Or you could just drop the

WHERE clause and return all records. And if you enter the query editor you can select tables or views to work with for this report

this is the selection returned form query editor

SELECT store_id, name, guid, last_update
FROM dzcontent.product

From that Here is a simple created report from or DSN through created report.

Create Simple Tabular Report

Select how items are grouped

Jump to the end and select finish

Simple report with adjust column headings

Article Recap

Hopefully I’ve kept this article simple and easy to use. I like the follow along approach an article like this offers.

  • PostgreSQL up front information
  • Setup and installation of ODBC drivers
  • Simple Excel Report Process
  • Simple SSRS Report Process

Also, these steps for using PostgreSQL aren’t only meant for usage with DAZ Studio.  You can use theses tips to install ODBC for
other usages as well. You could also set this up with Microsoft access.
My goal is to build a mini accounting system for my content. Knowing how much I paid in relation to content in my database and content on my machine
will help me out if I ever get to that PAID ARTIST category. 🙂

If you see errors or omissions please let me know. Comments are always welcome.
Thank you,

Joseph

 

Categories: DAZ3D, PostgreSQL, Technology, TSQL Tags: ,

3D ART :- A Walk In The Garden

3D ART :- A Walk In The Garden

This is great how this image came together.  Not much to explain on this post. I just thought

that all came together very nice. Image composition and colors all work very well together. 🙂

  • HIGHER RESOLUTION IMAGES AVAILABLE.