Programmatically Creating Page using $wpdb and getting 404 error

Permalink Error

I thought I was using a basic permalink, but forgot that I had used a custom permalink structure on this particular website.

The custom permalink I used was %postname%.

I switched it to the month and name option and now everything works. Sorry for the bogus question.

tech