“Interface not supported” error when attempting to open Excel or Word from Delphi

Interface not supported

When using Delphi that outputs some text into Excel or Word, I encountered the error “Interface not supported” on one machine

The problem was that the previous version of Excel was uninstalled incorrectly on the machine. To fix it, I used these steps :

  1. Open the regedit editor.
  2. Open HKEY_CLASSES_ROOT >> TypeLib >> {00020813-0000-0000-C000-000000000046}

(The Excel PIA key is {00020813-0000-0000-C000-000000000046}) 

3. Delete the version that you don’t have. Leave only the version that you have instaled. In my case it was Excel 2010 which is 1.7. For Excel 2013 is 1.8, and for Excel 2016 is 1.9

Here are the version controls

Excel HKEY_CLASSES_ROOT\TypeLib{00020813-0000-0000-C000-000000000046}\

  • 1.7 is for Office 2010
  • 1.8 is for Office 2013
  • 1.9 is for Office 2016

Word HKEY_CLASSES_ROOT\TypeLib{00020905-0000-0000-C000-000000000046}\

  • 8.5 is for Office 2010
  • 8.6 is for Office 2013
  • 8.7 is for Office 2016

PowerPoint HKEY_CLASSES_ROOT\TypeLib{91493440-5A91-11CF-8700-00AA0060263B}\

  • 2.a is for Office 2010
  • 2.b is for Office 2013
  • 2.c is for Office 2016

Outlook HKEY_CLASSES_ROOT\TypeLib{00062FFF-0000-0000-C000-000000000046}\

  • 9.4 is for Office 2010
  • 9.5 is for Office 2013
  • 9.6 is for Office 2016

Hope it helps

Coffee Cup

There are seven things that poor people do that the wealthy don’t

This is my first contribution to the field of wealth management. I sincerely hope that I will be able to assist someone in rising above the ruins of poverty. If you’ve had some of these ideas for a long time, it’s advisable to give them away and adapt new ones to help you become financially independent.

  1. Rich folks read or listen to audio books while poor people watch TV.

Garbage in, garbage out, as the saying goes. When you’re sitting in front of the television, you can’t come up with great ideas or inspirations. The television nowadays has been programmed to keep you captivated to the screen.

I’ve always thought that if you want to progress in life, you have to start with yourself. There is no other way to learn but to read the books written by great leaders about their lives.

Practical applications : You must seek out a mentor. YouTube is the next best thing to a library in my opinion. There are a plethora of success audiobooks and wealth audiobooks to pick from. Look for someone you want to be like. Listen for a time and then go for it if it makes sense.

  1. Poor people are paid on the basis of time, but wealthy people are rewarded on the basis of results.

You could be the best package counter or server in the restaurant at work. Because of the value you contribute to the market, you have a low income. If ten people can do the same job as you, you aren’t very valued at work.

The wealthy want to make a difference in the world, whether it’s for the environment or for humanity. The rich invest a great amount of time and effort into creating a product that meets a societal need. This is what value creation entails. Athletes are not compensated based on the number of hours they train, but rather on their performance.

Practical applications : You must re-invest in yourself. Study or follow a passion for something you’ve always wanted to do, such as photography or software development. You can study for 365 hours in a year if you study for an hour a day.

  1. Poor individuals blame others for their misfortune, whereas wealthy people accept responsibility for their own misfortune.

It is often simple for disadvantaged individuals to place blame on others. They can either blame the government or the boss for their position. Some even accuse God and the weather of being to fault. The city in which they resided, as well as their neighbors.

Rich individuals, on the other hand, take responsibility for their actions, whether they are good or harmful. What frequently happens is that wealthy people ponder about the problem or seek expert advice from others to address it.

Practical applications : We all have issues. It should be set aside for the needy. The rain poured on the rich and the poor alike. But there is a solution if you allow your mind to assist you in figuring out how to fix your difficulties.

  1. Poor people concentrate on saving, whilst wealthy people concentrate on investing.

This is when the uncles and aunts will tell you that we shouldn’t drink Starbucks to save a few bucks here and there. Alternatively, we may fly in economy throughout our trips.

Rich people, on the other hand, concentrate on increasing their wealth. Some investments are hazardous, but they pay off handsomely. The money you earn from your investment is utilized to buy things.

Practical applications : This one is quite difficult to begin. The goal is to set aside at least 40% of your income. We all make adjustments based on how much money we have left. After a year of this, the next stage is to hunt for dividend-paying investment products, such as the stock market or money markets.

  1. Poor individuals believe they know everything, whereas wealthy people are constantly learning.

Poor people are always expressing their views. They are always keen to share their political and sporting perspectives with the rest of the world. The most recent rumor or scoop in the society.

Wealthy people are perpetually humble and willing to learn. They often hang out with people who are wiser than they are.

Practical applications : You’ll need to surround yourself with business people or those who want to be business people for this one. If you want to be a competent app developer, choose someone to model yourself after. However, it is important to remember to replicate the great aspects of life and avoid the negative ones.

  1. Poor people believe money is the source of all evil, but wealthy people believe poverty is the source of all evil.

When we think of poor neighborhoods, we think of criminals, drugs, and a variety of other problems. If you think about it, bank robbers are not wealthy people. Money is a tool that may be used for either good or evil.

Rich people, on the other hand, began with the intention of assisting others. The money will then follow. They are compensated for solving challenges.

Practical applications : For a long time, families have avoided discussing money with their children, leaving them unsure of what to do with the money when it arrives. We need to modify this to show that money isn’t the problem; it’s what you do with it that is. You can still choose to use it for good or evil.

  1. The poor have a lottery mentality, while the wealthy have an action mentality.

People who are poor desire to buy lottery tickets. Winning is the only way to become wealthy. It’s all a coincidence. People who are wealthy take action. We’re confident that we’ll be able to pull it off. Do not put your faith on a lottery ticket.

Practical applications : Being reliant on luck has never made anyone wealthy. The term “burning the midnight oil” is one that everyone seems to be scared of. Rich people aren’t afraid to work all day if it means they’ll get closer to their objectives.

Video link : https://youtu.be/6c0d9Jlr8JE

Contact Us – How to send email with attachment in PHP

Send Email Attachment

I have done a lot of contact us page in websites before and this one, i had to add email attachments as well. The secret to it was to upload it to your website before you can send it as an email attachment.

Recently I found a great website that does that.

Hope it helps somebody out there

Coffee Cup

<?php 
 
// Recipient 
$to = '[email protected]'; 
 
// Sender 
$from = '[email protected]'; 
$fromName = 'CodexWorld'; 
 
// Email subject 
$subject = 'PHP Email with Attachment by CodexWorld';  
 
// Attachment file 
$file = "files/codexworld.pdf"; 
 
// Email body content 
$htmlContent = ' 
    <h3>PHP Email with Attachment by CodexWorld</h3> 
    <p>This email is sent from the PHP script with attachment.</p> 
'; 
 
// Header for sender info 
$headers = "From: $fromName"." <".$from.">"; 
 
// Boundary  
$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
 
// Headers for attachment  
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; 
 
// Multipart boundary  
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . 
"Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n";  
 
// Preparing attachment 
if(!empty($file) > 0){ 
    if(is_file($file)){ 
        $message .= "--{$mime_boundary}\n"; 
        $fp =    @fopen($file,"rb"); 
        $data =  @fread($fp,filesize($file)); 
 
        @fclose($fp); 
        $data = chunk_split(base64_encode($data)); 
        $message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" .  
        "Content-Description: ".basename($file)."\n" . 
        "Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" .  
        "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; 
    } 
} 
$message .= "--{$mime_boundary}--"; 
$returnpath = "-f" . $from; 
 
// Send email 
$mail = @mail($to, $subject, $message, $headers, $returnpath);  
 
// Email sending status 
echo $mail?"<h1>Email Sent Successfully!</h1>":"<h1>Email sending failed.</h1>"; 
 
?>

How to Fix Windows 10 “Cannot Connect to Printer” – Error 0x0000011b

How to Fix Windows Cannot Connect to Printer

I have a case that a newly installed windows 10 pc, although already shared the 2 printers, the pc on the network cannot establish share.

The system says ‘Connect to Printer’ error.

What you can do is to go to registry editor,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print

right click and create new DWORD 32 Bit

RpcAuthnLevelPrivacyEnabled

right click and click Modify. it should be hexadecimal with 0

Next is to open the windows services and look for PrinterSpool

Then right click and then click RESTART

After that, you can now use File Explorer to add the printer remote thru the network.

Hope it helps

Coffee Cup

Microsoft SQL Server Eating Lots of Hard Drive

Microsoft SQL Server Dump Files

I had a case recently about their server that have zero 0 space remaining in their drive C. i have seen this issue before and it involves the dump files collected every time the server is restarted.

The path to the dump files can be “C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase\dump”

Another path is “X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log”

Recently i have searched if there was a way to turn it off

Some have version folders

VersionPath
SQL Server 2019C:\Windows\SysWOW64\SQLServerManager15.msc
SQL Server 2017C:\Windows\SysWOW64\SQLServerManager14.msc
SQL Server 2016C:\Windows\SysWOW64\SQLServerManager13.msc
SQL Server 2014C:\Windows\SysWOW64\SQLServerManager12.msc
SQL Server 2012C:\Windows\SysWOW64\SQLServerManager11.msc

net start “SQL Server (MSSQLSERVER)”

next i found is the data collector

USE msdb; GO EXEC dbo.sp_syscollector_disable_collector;

Hope this info help out a fellow traveller

Coffee Cup

PHPMailer – SMTP error password command failed

phpmailer smtp gmail

Hey guys, i have been experimenting with smtp and gmail for sending to clients using php. Found this wonderful article and thought of saving it here on my blog as a keepsafe. Unfortunately, bobcares does like his blogs to be posted anywhere else. Such a shame.

Anyways, hope you enjoyed the research. It helped me through mine.

Leave some comments blow.

Coffee Cup

phpmailer-smtp-error-password-command-failed

Stuck with PHPMailer – SMTP error password command failed? We can help you.

We may come across this error when we try to send mail using phpmailer().

SMTP ERROR: Password command failed: 534-5.7.14

As part of our Server Management Services, we assist our customers with several SMTP queries.

Today, let us see how to fix this error.

PHPMailer – SMTP error password command failed

This error may occur due to the below reasons:

  • When a less secure application tries to use the email account.
  • If we try to log in several times a row
  • If we change countries (For example, use VPN, move code to a different server, or actually try to login from a different part of the world).

Moving ahead, let us see the methods our Support Techs employ in order to fix this.

Solution 1: In the case of the Windows server

PHP.ini

  1. Initially, we go to C:\xampp\php, edit the php.ini file with notepad.
  2. Under the [mail munction] section, we remove the semicolon for this line:sendmail_path = “\”C:\xampp\sendmail\sendmail.exe\” -t”
  3. Then we add a semicolon for this line:sendmail_path=”C:\xampp\mailtodisk\mailtodisk.exe”

SendMail.ini

  1. Here, we go to C:\xampp\sendmail, edit the sendmail.ini file with notepad
  2. Then we change the following:smtp_server=smtp.gmail.com smtp_port=465 [email protected] auth_password=your-gmail-password [email protected]

smtp_port should tally with what is written in our php code.

Solution 2: Enable less secure applications (SMTP server is Gmail)

  1. Initially, we login to the account via web
  2. Then we view recent attempts to use the account and accept suspicious access:
    https://security.google.com/settings/security/activity?hl=en&pli=1
  3. We can disable the feature of blocking suspicious apps/technologies:
    https://www.google.com/settings/u/1/security/lesssecureapps

Solution 3: (SMTP server is Gmail)

  1. Initially, login to the account via web
  2. Access the URL: https://accounts.google.com/b/0/DisplayUnlockCaptcha
  3. Then we click the continue option
  4. We can check whether phpmailer is set as SMTP with SSL.

This will work if our SMTP server is Gmail.

Solution 4: Change SMTPSecure value from SSL to TLS in phpmailer() code.

Solution 5: In the case of Gsuite

In such a case, we have to solve it as the Administrator.

  1. Go to Admin panel >> Security with Shield icon >> Basic settings
  2. Then go to the Less secure apps section
  3. Now we select one of the Radio Button:

a) Disable access to less secure apps for all users (Recommended)
b) Allow users to manage their access to less secure apps
c) Enforce access to less secure apps for all users (Not Recommended)

Generally, if option a) does not work, it will start to work with the c) option.

Solution 6: In the case of cPanel/WHM servers

This is related to a security feature in WHM/cPanel.

  1. Firstly, log in to CPanel
  2. Navigate to Tweak Settings > All > “Restrict outgoing SMTP to root, Exim, and mailman
  3. Eventually, switch it from “On” to “Off”.

In addition, we can do this via SSH as well:

/scripts/smtpmailgidonly off

GFIX — Firebird Administration

GFIX is Firebird’s command line tool for administration issues like data repair, sweeping, etc.

General Syntax

gfix [options] -user <username> -password <password> <database> [options]
 
-user <username>Database user name
-pas[sword] <password>Database password
-fet[ch_password] <filename>Instead of -password: Fetch password from the file so it is not visible in the command line. When <filename> is stdin, the user will be prompted for the password. [Firebird 2.5]

Database Shutdown

When a database has been shut down, only SYSDBA and the database owner are able to connect to the database in order to perform administrative tasks.

Options

-at[tach] <seconds>Used with the -shut option. Waits <seconds> seconds for all current connections to end. If after <seconds> seconds there are still connections open, the shutdown will be cancelled and return an error.
-f[orce] <seconds>Used with the -shut option. Waits <seconds> seconds for all connections and transactions to end. After this time, all connections and transactions are cancelled and the database is shut down. Use with caution.
-o[nline]If a -shut operation is pending, it is cancelled. Otherwise, takes a database back online
-sh[ut]Shut down database. Must be used together with -attach, -force or -tran
-shut {normal | multi | single | full}-online {normal | multi | single | full} Firebird 2.0 and later: New shutdown modes:NORMAL: Database is active and online
MULTI: Only connection from SYSDBA and the Database Owner will be allowed (compatible mode with Firebird 1.0/1.5)
SINGLE: Only one SYSDBA or Database Owner connection will be allowed
FULL: Exclusive shutdown: Database is completely offline, no connections will be allowed (it is now possible to access the database file safely on a file basis, e.g. for backups)Use -shut to “go down” the scale of shutting down and -online to “go up” that scale.
-tr[an] <seconds>Used with the -shut option. Waits <seconds> seconds for all running transactions to end. If after <seconds> seconds there are still running transactions, the shutdown will be cancelled.

Examples

Shut down database, wait 60 seconds until all connections are closed

gfix -user SYSDBA -password "masterkey" dbserver:/db/mydb.fdb -shut -attach 60

Note that GFIX will terminate with an error if there are still connections open after 60 seconds.

Shut down database, force shutdown after 60 seconds

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut -force 60

Shut down database, force shutdown NOW

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut -force 0

Put database online again

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -online

Examples for Firebird 2.0

Shut down database to single user mode

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut single -force 60

Put database online again

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -online normal

Shut down database, force shutdown NOW, allow no subsequent connections, even from SYSDBA or Owner

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut full -force 0

Database Repair, Sweeping

Options

-f[ull]Use with the -v option. Checks all records and pages and releases unassigned record fragments
-h[ousekeeping] 0Switch off automatic sweeping
-h[ousekeeping] <n>Set Sweep Interval to <n> transactions (default is 20000)
-i[gnore]Ignores checksum errors during a validate or sweep
-m[end]Marks corrupt records as unavailable so they are skipped on a subsequent backup
-n[o_update]Use with the -v option. Checks all records and pages and reports errors but does not repair them
-sweepForces an immediate sweep
-v[alidate]Check database for validity. At the same time, errors are reported and repaired

Examples

Validate Database

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -v -f

Sweep Database now

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -sweep

Set Sweep Interval to 50000 transactions

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -h 50000

Switch off Automatic Sweeping

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -h 0

Misc

Options

-a[ctivate]Activate Shadow file for database usage
-b[uffers] <pages>Default cache buffers for the database will be set to <pages> pages
-c[ommit] <id>Commits limbo transaction specified by the given <id>
-c[ommit] allCommits all limbo transactions
-l[ist]Display IDs of all limbo transactions and what would happen to each transaction if you would use -t on it
-mo[de] read_writeSet mode of database to read/write (default). Requires exclusive access to database (shutdown)
-mo[de] read_onlySet mode of database to read-only. Requires exclusive access to database (shutdown)
-pa[ssword] <password>Database password
-p[rompt]Use with -l. Prompts for action.
-r[ollback] <id>Rolls back limbo transaction specified by the given <id>
-r[ollback] allRolls back all limbo transactions
-s[ql_dialect] 1Sets SQL dialect 1 for the database
-s[ql_dialect] 3Sets SQL dialect 3 for the database
-t[wo_phase] <id>Performs automated two-phase recovery for limbo transaction with the given <id>
-t[wo_phase] allPerforms automated two-phase recovery for all limbo transactions
-user <name>Database username
-w[rite] syncEnables Forced Writes
-w[rite] asyncDisabled Forced Writes
-zShow GFIX and server version

Examples

Set Database to Read-Only

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut -attach 60
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -shut -force 0
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -mode read_only
gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -online

Set Database to SQL Dialect 3

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -sql_dialect 3

Enable Forced Writes

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -write sync

Disable Forced Writes

gfix -user SYSDBA -password masterkey dbserver:/db/mydb.fdb -write async

http://www.destructor.de/firebird/gfix.htm

Business Models Ideas (20210914)

Business Ideas
  • Consulting – price / events / value of knowledge
  • Blogger – collaboration / click per view / online courses
  • Property Management – shove snow / mow loan / doing maintenance / show apartments / get landlord / collect cash
  • Drop shipping – no handling fees / marketing / advertising / list amazon / eBay / manufacturer / send to customer / sell using own brand / online store / market place / Lazada and Shopee
  • Affiliate Marketing – indirect influencer / niche / affiliate / click bait / amazon / follow link / blog or social media / talk makeup put links / clink juncsion
  • Errand / Services – grocery / chores / dry cleaning / super assistant to busy boss / DTI / payroll
  • Online Printing – printed on t-shirt / affordable designer / ambassador / seasonal trend / Feb. lover t-shirt
  • Interior Design – design for clients / consultation
  • Photography – stock photos / decent camera
  • Advertising – newspaper commercials / book or website / put qr code / google ads / seo
  • Free Premium – model certain features are free and certain features are not. Gmail storage limit / WordPress platform with add-in template and plug-ins
  • Subscription – Milkman deliver milk and take the money. Recipe / Nike sign0up / Coffee patrons
  • Transaction – give service / give money

Property Ideas (20210213)

Property Notes

These are suggestions on how to expand and business ideas

Business – bakery , tricycle , egg dealer , barber , coffee , restaurant , fish ball , automotive , organic farming , Korean food , inihaw manok, refilling station

Salary of the people – lifestyle – hobbies – past time

Land – farming , motorcycle terminal, aquaponics, animal farming, tour guides, prepare to stay, scenic spots , food carts , commissary , fiesta , seasonal food (dragon fruit / sili), solar panel, water generation, sell online, prepack food , pigfeed , cooked food

Market – resto, hotels, hospitals, barangay fiesta, party, palengke , weddings , office , carinderya.