---
title: "Aspose::Email::AntiSpam::SpamAnalyzer::LoadDatabase method"
url: "https://reference.aspose.com/email/cpp/aspose.email.antispam/spamanalyzer/loaddatabase/"
product: "Aspose.Email for C++"
description: "Loads Bayesian database from stream."
---


## LoadDatabase (1 of 2) {#loaddatabase_1}

Loads Bayesian database from stream.

**Returns:** void Aspose::Email::AntiSpam::

```cpp
LoadDatabase(System::SharedPtr < System::IO::Stream > stream)
```

| Parameter | Description |
| --- | --- |
| stream | An input stream containing Bayesian database. |

---

## LoadDatabase (2 of 2) {#loaddatabase_2}

Loads Bayesian database from file.

**Returns:** void Aspose::Email::AntiSpam::

```cpp
LoadDatabase(System::String filePath)
```

| Parameter | Description |
| --- | --- |
| filePath | The full or relative path to the file containing Bayesian database. |

