Databases are organized collections of data, most commonly accessed through management systems including schemas, tables, queries and processes that allow users to enter and manipulate the information or utilize it in other fashions, such as with web applications or for reporting purposes.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi , I would like to load data from 3 different SQL Command (3 different queries) in 3 different excel files in one folder with each excel file with Date time feature in One package .
I tried this solution however getting issue as It wont open mapping window for 2nd Excel destination. However 1 excel file is loaded successfully., Your help is appreciated

Error is:

Excel destination: Opening a rowset failed. Checked that objects exists in Database.
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

My company recently moved to an Azure server and with that came a more secure database dynamic. Alas, my PDO connection is now not working and I'm stuck.

Let me preface this by saying I'm running PHP 5.5.30 and updating is not an option just because of the antiquated code that characterizes the app. I'm concerned that an update would knock some things over and it would be a real mess.

The PDO that I'm working was built with a view to a more contemporary and secure future. Until everything is in place, however, we're taking baby steps and that brings us to the current dilemma.

Here's what I've got currently:


$database = "accurate";

try {
	 $options = array(
	PDO::MYSQL_ATTR_SSL_CERT  => accurate',
    $conn = new PDO($test, $user, $password);
} catch (PDOException $e) {
    echo 'Connection failed: ' . $e->getMessage();


Open in new window

Where you see "accurate," I'm referring to what I know to be an accurate setting, be it a database name or the location of the SSL_CERT. When I run this, I get:

Warning: PDO::__construct(): Unable to set private key file `D:\www\toolbox' in D:\www\toolbox\functions\personnel.php on line 23

Warning: PDO::__construct(): failed to create an SSL handle in D:\www\toolbox\functions\personnel.php on line 23

Warning: PDO::__construct(): Cannot connect to MySQL by using SSL in D:\www\toolbox\functions\personnel.php on line 23

Warning: PDO::__construct(): [2002] (trying to connect via tcp:// in D:\www\toolbox\functions\personnel.php on line 23
Connection failed: SQLSTATE[HY000] [2002]
WordPress / WooCommerce Database is huge.  I'm helping with a store that over the years the database tables have become huge.  Literally millions of table entries.  Is there any way to get rid of data that is no longer needed in the postmeta table?  Is there old information that no longer needs to be stored?

I was told I can use the following in MyPHPadmin:
SELECT * FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;

Open in new window

But if I do that, will I loos anything from my WooCommerce Store?
is there an easy way to determine the last time a user account established a connection to a SQL Server instance, or directly to a database within an instance? I need to verify who has access to a SQL instance, and wanted some stats in regards to last accessed information to build my case if some do not seem to be appropriate.
I am trying to migrate a MSSQL database to MySQL. I tried the migrate feature of MySQL Workbench, but it does not work. Even though the connection to MSSQL tested without a problem, the migration program does not find any schemas to import.

I then created a SQL file using SQL Server Management Studio and tried to import it using myphpadmin. It also failed, even though the compatibility was set to mssql.

Can someone help me move this database? I don't care how. Either to help me figure out what is going wrong with the above two methods, or introduce a third method.

Thank you.
I had this question after viewing JavaScript define value to pass.

How can i do this, to get the latest id from a mysqli database and put desired values into a label?
I have a winforms ERP software built using C# dotnet. Database is sql server. My issue is with installation at client side. It is taking huge time to install. Major time consuming is the installation of MSSQL server and its Management Studio. Is it necessary that I should install sql server at client side? Is there any option where I can copy the mdf and ldf files of the sql database to the system and connect with my application (like we do with access database)
I had this question after viewing MS Access copy and rename file.

I have inherited an Access database that has needed a bit of updating. I have created code to capture a file path and name in a single field.  Now I need to use that information to copy the file to a different directory and rename it with a somewhat complicated naming convention that is already in the code. The original code was designed to capture a WIA scanned document and then convert it to PDF before saving it. Here is some of my code that currently fills a text box.     Set fd = Application.FileDialog(msoFileDialogFilePicker)
    With fd
        .ButtonName = "Select"
        .AllowMultiSelect = False
        .Filters.Add "PDF Files", "*.pdf", 1
        .Title = "Choose PDF File"
        .InitialView = msoFileDialogViewDetails
        For Each oFD In .SelectedItems
            fileName = oFD
        Next oFD
        On Error GoTo 0
    End With
    txtBOX1 = fileName
    Set fd = Nothing

txtBOX1 is the field that need to have the updated name and location in.  Suggestions would be most appreciated.
I have a weird issue running a SQL proc that returns a picture as a blob.

My laptop, LAP1, is on our corporate domain "CORP", and I am a domain user "CORP\bgood".
On that domain is a MS SQL Server "SQL1".   SQL1 runs a database DATA1.
I also have a SQL Login on SQL1 called "good_b".

There are picture files on a domain server FILE1, which LAP1 and SQL1 seem to be able to access, using File Explorer from each machine.  Both have the the picture folder mapped as "L".

From LAP1, I connect to DATA1 using SQL Server Management Studio with Windows Authentication (CORP\bgood).  Executing the procedure (similar to code below) returns a row but the Pic1Blob column is NULL.   HOWEVER -- Using  SQL SERVER authentication (good_b), the row returns nicely with the picture in Pic1Blob!

This seems backwards to me -- I would have expected Windows Authentication to work since the Windows Domain user bgood has access to the domain files.

ALSO -- If I log on to the actual SQL1 machine as "CORP\bgood" and connect to DATA1 using Windows Authentication, I can run the procedure fine, with data in the Pic1Blob column.  So, I am thinking there may be some sort of NT SERVICE or NT AUTHORITY permissions issue.

I hope I've described this right.  Any suggestions?     I can give you any more information you may need.

	CREATE TABLE #Temp1(Pic1Blob VarBinary(max))

	DECLARE @PathToPhoto varhar(50) = 'L:\Images\MyFace.jpg'

Open in new window

Hi expert ,  I count the period of start date and today date and by loop insert into the database , but problem is when i insert already the period and when i on the next month so how the new month was insert into . Any solution for tis case?

I also encounter with the problem of total if the payment not paid , the fine will added 10% into total , so the total should be 500 (first month) , 550 (second month) and 600 (third month) insert with the loop.

	$start = (new DateTime($sdate))->modify('first day of this month');
	$today = date("Y-m-d");
	$end      = (new DateTime($today))->modify('first day of next month');
	$interval = DateInterval::createFromDateString('1 month');
	$period   = new DatePeriod($start, $interval, $end); 
	foreach($period as $dt){
	$date = $dt->format("M Y");
	$invoice_sum = $service + $sink + $fire + $quit + $ass; 
	$total_payment = $invoice_sum + $late_payment - $paidfee;
	$query3 = "INSERT INTO owner_monthlyfees (`owner`,`unit_name`,`date`,`invoice_sum`,`payment`,`late_payment_charges`,`total`) VALUES ('$owner','$unit','$date','$invoice_sum','$paidfee','$late_payment','$total_payment')";

Open in new window

Big Business Goals? Which KPIs Will Help You
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Can you please help me have a formula:

DATABASE: it should have data size(mb), data used(mb), %data used and threshold if I enter 10% I will get a result

DISK: it should have used space(gb), free space(gb), threshold
I need to search for a string in my Oracle database schema for a specific value, what is the best way to do that, or at least a doable way to do that?

For example, I have the following server name:

I want to query the database to see what tables and columns the string is in.

Thank you much.
i recently had a backup job go dormant for a few weeks and didn't notice the problem soon enough.  is there a strategy that someone might point me to that is not overly complex, but its pretty rock solid as far as making sure your backups are working properly.

all the backup jobs and maintenance are running through ssms maintenance plans.

i have 3 maintenance plan set ups.
Backup full
Backup differential
and one called "maintenance" - this one cleans out old back up files

on the email notifications on the sql agent job... question.
Look at attachment 1 for reference.  I have this set to "when the job completes".  does this mean it will fire off an email when the job succeeds or fails?

2 follow up questions.

i want to test this job to see what it does when it fails.  i see what it does when it completes successfully.  is there an easy way to fire this backup job off and make it fail... a certain setting i should try or something like that.

follow up question 2.  i would like to be immediately notified if the sql agent service turns off... best way for this?
I am using an Access 2016 split database with the backend table on a network folder. The front ends are on each computer. That said, when I try to open the tables in my front end, I am getting an error saying "recordsets are not updateable". Further, if I try to open the tables with another user using the tables from another computer, I get locked out.
I've got a job creating the backend for a mobile app for a company. They will need me to do sysadmin tasks as well.

This app is useless if it can't connect to a server. I need to come up with a redundant setup, ideally over different providers (would like to use Linode and AWS).

I was wondering - what is this called, and how do I set it up? The most similar thing I have done is hosting a database on a separate server - both of those were in the same datacenter. I've read that you do not want the database to accept connections from public IP Addresses.

How do I set this up where there is redundancy over multiple data centers?
We've split our floor plan project in 2 parts:

1. FP Builder
2. FP Viewer

For FP Builder we've used SVG Edit ( and for FP Viewer we've used MAPPLIC FP Viewer (

Currently in FP Builder when we do changes it gets saved in svg file. And we load the same svg in Viewer. We need to save svg shapes in database and retrieve svg from database. E.g. If there are 10 stands present in our floor plan there should be 10 database rows in database table. So that we have connectivity between our FP Builder and database.

And we need to add split and merge stand functionality for stands.

Many thanks for taking a look at my question.

Given the below SQL query that works

;with cte as
      select tr.tr_rowid_debtor as lp_rowdebtor_id, tr.tr_posted_date,
      (0-tr.tr_to_agency+tr.tr_to_client) as amount,tr.tr_account,
      ROW_NUMBER() over (partition by tr.tr_rowid_debtor order by tr.tr_posted_date desc) idx
      from de_transaction as tr
    where tr.tr_account = 16
Select d.de_number, lp_rowdebtor_id, tr_posted_date, amount, tr_account 
from cte 
inner join debtor as d on d.de_rowid  = lp_rowdebtor_id
where idx = 1

Open in new window

I need it to do exactly what it does above but also - 1 additional item I need, is that somehow I need a count of the each transaction it finds per by "tr.tr_rowid_debtor" and only give back a result for the files that have multiple instances of where tr.tr_account = 16.

many thanks!!
Wondering why the code below won't set as the selected item (a number 1-5) based on the database field value?

Thanks in advance for any help!

    sThisRdr = lstRdrPriority.Text
    Set rs = New ADODB.Recordset
    sql = "SELECT ReadOrder FROM FinishReader WHERE MeetsID = " & lMeetID & " AND ReaderNum = " & sThisRdr
    rs.Open sql, conn, 1, 2
    lstPriority.Text = rs(0).Value
    Set rs = Nothing

Open in new window

hi am downloading the file using webutil how can i set the context to ASCII or Text when i download the file in my window is puting everything in one line am in oracle form 11gR2  the application is running in solaris
Determine the Perfect Price for Your IT Services
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

I am reading image files from a folder and save the results in the database. There are multiple duplicate images in a folder (same image but different filename).
I am getting md5 of a file to marked the file as duplicate.

While saving the records in database how I can ignore the duplicate files to not save in Database.

This is my code:


require_once 'db.php';

$dir = '../../../../../sites/default/files/';

$exts = array('gif', 'jpg', 'jpeg', 'png');

if ( is_dir($dir) ):

    // Set up the Iterator
	$directory = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS); //skip dots and double dots hidden folders
    $iterator = new RecursiveIteratorIterator($directory);

    // Clear the table
    $conn->query("TRUNCATE TABLE searchindex_images");
    // Prepare the INSERT query   
	$insert = $conn->prepare("INSERT INTO searchindex_images (dir, img_names, lang,file_date) VALUES (? , ? , ? , ?)");
	$insert->bind_param("ssss", $path, $img, $language,$myhash);   	
$foldersToSkip = ['css','default_images','docs'];

foreach ($iterator as $file):
    $folders = explode( DIRECTORY_SEPARATOR, $file->getPath() ); // split the path into an array.	

    if ( ! empty( array_intersect($foldersToSkip, $folders) ) ) { // see if any folder is matched with $foldersToSkip
        // let's skip this folder
		print "<br>Folder SKipped";
			//// This code only works on Linux OS. It checks for arabic characters in

Open in new window

PHP - two separate forms on two pages. I want to combine them into one form on one page.

Form No. 1 - uploading three images -

<form enctype="multipart/form-data" action="add_file2.php" method="post">

	<fieldset><legend>Fill out the form to upload a file:</legend>
    <input type="hidden" name="MAX_FILE_SIZE" value="524288">
	<?php // Create the inputs.
	for ($i = 0; $i < $counter; $i++) {
		echo '<p><b>File:</b> <input type="file" name="upload' . $i . '" /></p>';
    <input type="hidden" name="submitted" value="TRUE" />
    //<div align="center"><input type="submit" name="submit" value="Submit" /></div>

Open in new window

Form No 2. - general information

    <form action="PostANoticeYE.php" method="POST" accept-charset="utf-8">
         <p><label for="description" class="SmallHeading"><strong>Description</strong></label>
Please enter a brief description. You have up to 300 characters.
      <div id="div1">Characters Left = 300</div>
<?php create_form_input('description', "textarea", $PostANoticeYE_errors,"maxlength='300' onkeyup='return chlimit(this)' "); ?>

<br />

		<label for="amount" class="SmallHeading"><strong>Amount</strong></label>
        <p class="noticeType">Less than 20 characters please.
		<?php create_form_input('amount', 'text', $PostANoticeYE_errors); ?><br />

		<label for="currency" class="SmallHeading"><strong>Currency</strong></label>
        <p class="noticeType">Enter the currency that you used to

Open in new window

Hi Database Experts,

As part of code deployment, we also execute Database DML and DDL. Recently a cursor statement (select / update) badly affected our PPTE environment. Since we have less data in lower environment. we actually couldnt catch this. however it took 3+ hrs in PPTE.

Is there any automated way to check this poor coding when executing in lower environment please?
  1. Can we add custom sql (as part of post sql on every deployment) to generate profile or gather stats when executing in lower env? So we check this report every time
  2. Anything with non-sys or non-system user. Basically with the user account who executes SQLs.
  3. SonarQ profile

I want to fetch data from 3 table for time periods , i am using UNION All but its show error.
My sql code is
$sql_search = "(SELECT invoice_amount_wt_gst, cr_note, company, client, invoice_no, job_no FROM psb_billing WHERE invoice_date BETWEEN '$recv_date' AND '$invoice_end_date' and currency = '$currency' and company = $comp)
(SELECT on_ac, tds, client, job_no, invoice_no FROM receiving_report WHERE receiving_date BETWEEN '$recv_date' AND '$invoice_end_date' and currency = '$currency' and company = $comp)
(SELECT bf_amount, bf_credit_amount FROM psb_clients_bbf WHERE currency = '$currency' and bf_company = $comp)";	

Open in new window

i don't understand where i am wrong. and when i am using join query its show me lots of data. i think Its also fetch the wrong data.
my join query is
"SELECT PB.invoice_amount_wt_gst, PB.cr_note,, PB.client, PB.invoice_no, PB.job_no, PB.invoice_date, PB.currency, R.receiving_date, R.client, R.on_ac, R.tds, R.currency, BB.clients, BB.bf_amount, BB.bf_credit_amount, BB.currency, BB.bf_company FROM psb_billing PB left join receiving_report R on = left join psb_clients_bbf BB on PB.client = BB.clients WHERE PB.invoice_date BETWEEN '$recv_date' AND '$invoice_end_date'  ";

Open in new window

i attached the table sql file.
I appreciate your's help.
Thank you
I am doing an internship at an insurance Company and I have been tasked to create an employee/facility management database with Microsoft Access 2016.

Although I am still in an early phase of development (eliciting information/requirements), I have been asked whether it is possible to display a different ribbon based on the login provided.

I am using RibbonCreator and I understand that it is possible to have several ribbons in an Office document.
Is there a way with VBA to change the ribbon based on the login data provided (there are only four logins)?

It looks like that the data is stored in a table called USysRibbons with the following structure:
Ribbon XML

Open in new window

I understand that it is possible to change the Ribbon inside Access, but it requires a restart of the application.
Would the loading of a different Ribbon with VBA require the same procedure?

Another idea which I have in my mind is that only one customised ribbon with several tabs is shown.
I would then hide or show these tabs based on the login provided.
Is this an easier approach?

Thanks in advance for your feedback which I can put inside the functional requirements.

I have an ODBC connection to (Sage 100 ERP) databases with Microsoft Access.  We have three companies that each has their own separate database.  I have to log in each time I access a different database.  
Is there a way to log out of an ODBC connection?  Currently, I exit MS Access to log out of the ODBC connection and then open MS Access again to log into another Sage database .
Thank you for your help,






Databases are organized collections of data, most commonly accessed through management systems including schemas, tables, queries and processes that allow users to enter and manipulate the information or utilize it in other fashions, such as with web applications or for reporting purposes.