| |
|
| |
|
Node.js Database DriversNode.js bindings to relational databases · Home · FAQ · Blog May 17, 2011 / Posted by mariano / InstallBefore proceeding with installation, make sure you have the MySQL client libraries installed in your system. Specifically, you should have access to the mysql_config binary. If your MySQL binaries are not part of the path and for example are located in /usr/local/mysql/bin, make sure you specify the MYSQL_CONFIG environment variable: $ export MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config Once you have mysql_config in your path or the MYSQL_CONFIG environment variable set, you can go ahead with the installation: $ npm install db-mysql Connectingvar mysql = require('db-mysql'); Queryingvar mysql = require('db-mysql'); Using manual queriesIn the example below, usage of Database.name() and Database.escape() is not mandatory, but recommended. var mysql = require('db-mysql'); Insertingvar mysql = require('db-mysql'); Updatingvar mysql = require('db-mysql'); Deletingvar mysql = require('db-mysql'); DocumentationFore more in depth documentation check node-db's documentation. Bug reporting and source codeYou can report bugs on the project issues page.
|
Dim strDataBaseName As String Dim strDBCursorType As String Dim strDBLockType As String Dim strDBOptions As String Dim rs As ADODB.Recordset Dim cn As ADODB.Connection
Private Sub Command1_Click() On Error GoTo Command1_Click_Error Dim b as Long strDBCursorType = adOpenDynamic 'CursorType strDBLockType = adLockOptimistic 'LockType strDBOptions = adCmdText 'Options
Set cn = New ADODB.Connection Me.MousePointer = 11
cn.Open ConnectString()
With cn .CommandTimeout = 0 .CursorLocation = adUseClient End With
Set rs = New ADODB.Recordset 'Creates record set
strSQL = "<Your SQL Here>"
rs.Open strSQL, cn, strDBCursorType, strDBLockType, strDBOptions
if rs.Eof then Goto ExitSub else For b = 1 To rs.RecordCount '<do whatever you need to do with the data here> Next b end if
ExitSub:
rs.Close Set rs = Nothing cn.Close Set cn = Nothing
On Error GoTo 0 Exit Sub
Command1_Click_Error: MsgBox "Error " & Err.Number & " (" & Err.Description & ") & _ in procedure Command1_Click of Form " & Me.Name End Sub
Private Function ConnectString() As String Dim strServerName as String Dim strDatabaseName as string Dim strUserName as string Dim strPassword as string
'Change to IP Address if not on local machine 'Make sure that you give permission to log into the 'server from this address 'See Adding New User Accounts to MySQL 'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver
strServerName = "localhost" strDatabaseName = "DatabaseName" strUserName = "UserName" strPassword ="Password"
ConnectString = "DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=" & strServerName & _ ";DATABASE=" & strDatabaseName & ";" & _ "USER=" & strUserName & _ ";PASSWORD=" & strPassword & _ ";OPTION=3;"
End Function
|
When you send your emails on a regular basis you create a pattern of which readers will become familiar with. The less likely you are to catch readers by surprise the lower your non-subscription rate will be. Internet service providers (ISPs) will also take note of regular sending patterns and credit you accordingly.
It is important to find exactly how often you should send emails. By sending emails too often you will annoy users and by sending emails not enough users will forget about you. In either situation, they are likely to unsubscribe.
On Mondays everyone is running around trying to catch up on an inbox full of emails from the weekend. On Thursdays and Fridays everyone has one foot out the door looking forward or preparing for the weekend. Studies show that readers are most receptive to emails on Tuesday and Wednesday, and specifically after lunch from 2-3 PM.
Internet service providers (ISPs) have caught on as to how spam email is created and delivered. In their detection of spam they have developed diligent spam filters. One of the best ways to prevent an email from being flagged as spam is to completely leave out words like "Free", "Promotion", "Sale", "Discount", and so forth.
Spam filters will often look for a recent date within an email. If they do not come across one the email may potentially be flagged as spam, or pointed in the direction of the spam folder. Using the current date will also provide relevance to the reader as well.
Treat readers as your friend, even address them by their name if possible, and you will see open and click-thru rates skyrocket. No one wants to be addressed by "Hello there" or "Dear Subscriber". If I get an email address as "Good afternoon Shay" I am most likely going to open it. Any good email marketing service will allow you to address users by their name by using a tag similar to "[subscriber_name]". Check your specific service for instructions.
When a reader signs up for your email or newsletter send them a confirmation email. Once they confirm the subscription, then and only then, add them to your email list. Doing so ensures that they really want to be on the list and will be susceptive to your emails. This will also prevent you from adding people to your list that have accidentally entered the wrong email address or even purposely entered a fake email address.
The quickest way to get black listed is to buy and sell your email list. Your emails will regularly be flagged as spam and your delivery rate will plummet. Most email delivery services will also refuse to send out your email campaigns if your list is purchased.
After a user has signed up for your email list, and has double opt-in, send them a welcome or thank you email with a 10% off coupon. In another week send them another email outlining some resources available on your website. Staying in touch with users ensures them that you are trustworthy and may later help you complete a sale.
Once an email lands in a reader's inbox they have two choices. Read the email or disregard the email. Most commonly, the only opportunity you have to influence them to open the email is by the subject line. Do not title your email "FREE EMAILING ADVICE". Instead use "Company Name Newsletter: Smart Email Marketing" or "Company Name Newsletter: Issue 12".
If someone signs up for an email newsletter pertaining to web design and development and you send them an email about cheap auto insurance your non-subscription rate is going to explode. Keep your emails relevant and avoid continuously sending out sales pitches. Give your readers valued content.
Before sending out your email be sure to check all of the links, both websites and email addresses, included within the email itself. Any links to spam or blacklisted websites is sure to set off spam filters. Be sure to only link to creditable sources.
One of the best ways to build your email list is to give new subscribers an added bonus. Let readers know that by subscribing to your email newsletter they will receive a free e-book or even a 10% off coupon. Of course, make sure you use the double opt-in service to ensure that people are not providing you with false information.
Attempting to blast your email list instantly will throw up quite a few red flags and more than likely cause your email to head straight into the spam folder. Use a professional email delivery service that will send out the emails at a recommended effective speed in order to get all of your emails out in a reasonable time without causing any interruptions.
The best way to ensure your emails make it a reader's inbox is to encourage them to add your email address to their contact list, or white list. Not everyone will do it but those that do are your most dedicated readers and are sure to get your emails on a consistent basis without having to worry if the emails get flagged as spam. Additionally, internet service providers (ISPs) will count the number of times your email address is added to a white list as an account of creditability.
Any readers that are not opening and reading your emails are most likely marking them as spam. Removing these subscribers will help you lower your spam score. Furthermore, delete any hard bounces or undelivered email addresses. Repeatedly resending to these address may likely be considered as spamming.
Some users are going to reply to your email asking to be taken off of your email list. This is fine and it is in your best effort to listen to them. You may also receive replies from readers providing you with valuable feedback. Either way, checking your replies is to your benefit.