INCLUDE_DATA

Here is some code that I have been using to save my images into a MS Access Database with ASPX vb.net.

The html code looks like this. It is to upload a picture and add title and description to it.
[code language=”vb”]
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>
Image Upload Information</h1>
<p style="text-align: left">

<table>
<tr>
<td style="width: 100px">
&amp;nbsp; Image :&amp;nbsp;</td>
<td style="width: 100px">
<asp:FileUpload ID="FileUpload1" runat="server" /></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp; Title &amp;nbsp;&amp;nbsp; :&amp;nbsp;</td>
<td style="width: 100px">
<asp:TextBox ID="Tbtitle" runat="server" Width="376px">Title Here</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp; Description :&amp;nbsp;</td>
<td style="width: 100px">
<asp:TextBox ID="description" runat="server" Height="88px" TextMode="MultiLine" Width="384px">Description Here</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp;Location :&amp;nbsp;</td>
<td style="width: 100px">
<asp:TextBox ID="location" runat="server" Width="376px">Location Here</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp; Tags :&amp;nbsp;</td>
<td style="width: 100px">
<asp:TextBox ID="tags" runat="server" Width="376px">Tags Here</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp;Width :&amp;nbsp;<br />
</td>
<td style="width: 100px">
<asp:TextBox ID="width" runat="server" Width="40px">1024</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
&amp;nbsp;&amp;nbsp; Height :&amp;nbsp;</td>
<td style="width: 100px">
<asp:TextBox ID="height" runat="server" Width="40px">768</asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" Text="Upload Image" /></td>
</tr>
</table>
<br />
&amp;nbsp;
<br />
<br />
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</p>
</asp:Content>
[/code]
In the code behind page the following code is there. When you click the button it will upload the image to the MS Access Database and it will show the image on the page in the literal1

[code lang=”vb”]
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim wService As com.www.imgStore = New com.www.imgStore
Dim myFile As HttpPostedFile = FileUpload1.PostedFile
Dim nFileLen As Integer = myFile.ContentLength
Dim myData(nFileLen) As Byte
myFile.InputStream.Read(myData, 0, nFileLen)
Dim ms As IO.MemoryStream = New IO.MemoryStream(myData)
Dim img As Drawing.Image = convertImg(ms)
img = resizeImage(img, width.Text.Trim &amp; "x" &amp; height.Text.Trim)
Dim bytes() As Byte = imgToBytes(img)
Dim ret As String = wService.storeImage(Tbtitle.Text, description.Text, location.Text, tags.Text, width.Text, height.Text, Date.Now, bytes)
Literal1.Text = "http://www.yoursite.com/imgGrabing.aspx?id=" &amp; ret &amp; "<br/>" &amp; bytes.Length &amp; " Bytes Uploaded<br/><img src=""imgGrabing.aspx?id=" &amp; ret &amp; """>"
wService.Dispose()
ms.Dispose()
img.Dispose()
End Sub
[/code]

This is the code to convert the image.
[code language=”vb”]
Public Function convertImg(ByVal imgL As IO.MemoryStream) As System.Drawing.Image
Dim memstream As IO.MemoryStream = New IO.MemoryStream
Dim icf() As Drawing.Imaging.ImageCodecInfo = Drawing.Imaging.ImageCodecInfo.GetImageEncoders
Dim encps As Drawing.Imaging.EncoderParameters = New Drawing.Imaging.EncoderParameters(1)
encps.Param(0) = New Drawing.Imaging.EncoderParameter(Drawing.Imaging.Encoder.Quality, 100)
Dim btmp As Drawing.Bitmap = Drawing.Bitmap.FromStream(imgL)
btmp.Save(memstream, icf(1), encps)
btmp.Dispose()
btmp = Nothing
Dim img As Drawing.Image = Drawing.Bitmap.FromStream(memstream)
Return img
End Function
[/code]

Move the image over into a Byte() is done here:
[code language=”vb”]
Public Function imgToBytes(ByVal bmp As Drawing.Image) As Byte()
Dim ms As New IO.MemoryStream
bmp.Save(ms, Drawing.Imaging.ImageFormat.Jpeg)
Dim abyt(ms.Length – 1) As Byte
ms.Seek(0, IO.SeekOrigin.Begin)
ms.Read(abyt, 0, ms.Length)
Return abyt
End Function
[/code]

When I save the image, I resize it to a decent size to store in the database, so that I dont have to worry about resizing the images first before uploading.
[code language=”vb”]
Public Function resizeImage(ByVal img As Drawing.Image, ByVal size As String) As Drawing.Image
Dim oImg As Drawing.Image = img
Dim width As Integer = size.Split("x")(0)
Dim height As Integer = size.Split("x")(1)
Dim oThumbNail As Drawing.Image = New Drawing.Bitmap(width, height, oImg.PixelFormat)
Dim oGraphic As Drawing.Graphics = Drawing.Graphics.FromImage(oThumbNail)
oGraphic.CompositingQuality = Drawing.Drawing2D.CompositingQuality.HighQuality
oGraphic.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality
oGraphic.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic
Dim oRectangle As Drawing.Rectangle = New Drawing.Rectangle(0, 0, oThumbNail.Width, oThumbNail.Height)
oGraphic.DrawImage(oImg, oRectangle)
oImg.Dispose()
Return oThumbNail
End Function
[/code]

I have created a webservice to save the images, because I use it also to upload still images from my PTZ camera and it just connects to the webservice and stores the images.
[code language=”vb”]
<WebMethod()> _
Public Function storeImage(ByVal cameraid As Integer, ByVal preset As Integer, ByVal bits() As Byte) As Boolean
saveImg(cameraid, preset, Date.Now, bits)
Return True
End Function

Public Function saveImg(ByVal Cameraid As Integer, ByVal preset As Integer, ByVal picTimeStamp As Date, ByVal picImg As Byte()) As Boolean
Try
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\database.mdb"
Dim oleDBConn As New Data.OleDb.OleDbConnection(strConn)
oleDBConn.Open()
Dim oleDBAdapter As Data.OleDb.OleDbDataAdapter = New Data.OleDb.OleDbDataAdapter("Select * From Pictures", strConn)
Dim oleDBcb As Data.OleDb.OleDbCommandBuilder = New Data.OleDb.OleDbCommandBuilder(oleDBAdapter)
Dim ds As Data.DataSet = New Data.DataSet
oleDBAdapter.MissingSchemaAction = Data.MissingSchemaAction.AddWithKey
oleDBAdapter.Fill(ds, "Pictures")
Dim dsRow As Data.DataRow = ds.Tables(0).NewRow
dsRow.BeginEdit()
dsRow("Cameraid") = Cameraid
dsRow("Preset") = preset
dsRow("picTimeStamp") = picTimeStamp
dsRow("picBinary") = picImg
dsRow.EndEdit()
ds.Tables(0).Rows.Add(dsRow)
oleDBAdapter.Update(ds.Tables(0))
ds.AcceptChanges()
oleDBConn.Dispose()
oleDBcb.Dispose()
oleDBAdapter.Dispose()
Return True
Catch ex As Exception
Return False
End Try
End Function
[/code]

The Access Database structure I used is:
ImgID:AutoNumber
PicTimeStamp: Date/Time
picBinary:Ole Object
CameraID:Number
Preset:Number

Hope this will get you going in the right direction and start to save your Images to Database using vb.net and MS Access

Atlantis is found on Google Earth by  UK-based aeronautical engineer Bernie Bamford, the spotting on Google Map of the under water remains of Atlantis, real or fake, has put the name of the lost civilization on the front pages of the world media in capital letters.Very interesting news. It was published in the The Sun that he had seen grid of lines undersea off the coast of West Africa, about 600 miles west of the Canary Islands. The coordinates are 31 15’15.53N, 24 15’30.53W. You can see it on Google Map, however don’t zoom in completely as it will not give you any image on the max zoom in level, you have to go half way zoomed in. Here you see clearly a some square grid lines, which could indicate the sunken City of Atlantis. This location is very close to  the spot where Plato  had pinpointed as a possible resting place of Atlantis. In addition, the site is about the same size as Plato described. And if we believe Google’s explanation, why is this the only and first place such grid shows up on the sea bottom, in a location that is been pin pointed before as the Atlantis City?

Lost City of Atlantis on Google Earth

Lost City of Atlantis on Google Earth

Atlantis is a mythical Island which was first mention by Plato and he described how it sunk into the ocean in a single day and night around 9000 BC. However here is what Google has to say about it:

“It’s true that many amazing discoveries have been made in Google Earth including a pristine forest in Mozambique that is home to previously unknown species and the remains of an Ancient Roman villa.”

“In this case, however, what users are seeing is an artifact of the data collection process. Bathymetric (or sea floor terrain) data is often collected from boats using sonar to take measurements of the sea floor.

To me this sounds like a cover up. The explanation is a bit weak, Scientifically, Google’s assertion of sonar artifacts doesn’t make sense. Scrubbing artifacts from sonar data is Map making 101 and any intelligent map science professional will agree with this. If Google really wanted to put this to rest they would release the original raw data and allow it to be studied by other professionals. Maybe Google should take up the challenge and fund a research mission to check out this area. That is how they should deal with it. They have the money to fund something like that and let the results of the mission speak for itself.

If you look at the Geometrically rectangular shapes discovered are almost perfect, check it out:

Atlantis on Google Earth?

Atlantis on Google Earth?

So, you be the judge, however it is very interesting to see what just now surfaced. Lot of Lightworkers will be excited about this and as we are now in the Age of Aquarius.

How the ancients described that Atlantis sunk in the sea some 10,000 years ago is a never dying enigma. How the pyramids were built is another enigma from the same dimensions. I understand that the two are intertwined because I am in the possession of an Atlantis ring.  The one I have is a copy of the original. The original was found in 1860 in a tomb of High Priest Jua in the Valley of the Kings in Egypt. In the tomb was a text that stated that immunity against all mishap was granted to he who entered there. The ring has 3 tiny pyramids on each side of three lines, symbolizing the pyramids in Africa and in South America.

The lines connecting them symbolize the Atlantic Ocean. Flat triangles represent Atlantis and the other disappeared civilization of Lemuria. The methodical configuration of the pattern on the ring sends out vibrations that seem to have a beneficial influence to the owner.  This was first proven by Howard carter when he opened the burial chamber of King Tut Ankh Amon. Carter was in possession of the original ring when he opened the royal tomb and he did not meet any mishap while 18 others died mysteriously in the first year. Copies of the ring were made and every body that got a copy had the same feeling of being protected, of getting better insight, of understanding. I have the strong feeling that [part of] our world today is on the verge of its own destruction for the same reasons Atlantis disappeared; abuse of scientific power. Genetically Modified food crops, stem cell research, cloning, depleted uranium, weapons of mass destruction, colony collapse disorder (bees are vanishing), biological war fare, electronic frequency saturation, the list has no end. The Atlantis ring caries in it a serious warning. The articles in the media about what some think could be the remains of Atlantis alerts me again of the grave danger the world is in today. The ring I have may shield me from all mishap as it is a message and a warning keeping the danger at bay.

Here some more detail about Atlantis:

Atlantis: is a legendary island first mentioned in Plato’s dialogues Timaeus and Critias.

In Plato’s account, Atlantis was a naval power lying “in front of the Pillars of Hercules” that conquered many parts of Western Europe and Africa 9,000 years before the time of Solon, or approximately 9600 BC. After a failed attempt to invade Athens, Atlantis sank into the ocean “in a single day and night of misfortune”.

Scholars dispute whether and how much Plato’s story or account was inspired by older traditions. Some scholars argue Plato drew upon memories of past events such as the Thera eruption or the Trojan War, while others insist that he took inspiration from contemporary events like the destruction of Helike in 373 BC or the failed Athenian invasion of Sicily in 415–413 BC.

The possible existence of a genuine Atlantis was actively discussed throughout classical antiquity, but it was usually rejected and occasionally parodied by later authors. While little known during the Middle Ages, the story of Atlantis was rediscovered by Humanists in the Early Modern period. Plato’s description inspired the utopian works of several Renaissance writers, like Francis Bacon’s “New Atlantis”. Atlantis inspires today’s literature, from science fiction to comic books to films, its name having become a byword for any and all supposed advanced prehistoric lost civilizations.

Source: Wikipedia

For the last year I have been working with my friend and partner Dwain Carbon on his e-book Strategic Sponsoring and MLM business. Finally I decide to join his MLM business Trivani. The reason I didn’t join him earlier was not:

1- of my “bad” experience I had with MLM before,

In 1991 I went back to Holland for a year and was introduce by a some student friends to MLM. At that time it was NSA (water and air filters). It was really hyped up and I can remember clearly how excited I was after the meeting, couldnt hardly sleep and was so taken up with the “making money” that anything else around me didnt exist. So “my MLM friends” told me that is was best to buy my self a certain position, because that way you would start make the most money from anyone that joined after. So young and unexperienced as I was at that time and believing they would have the best interest for me I did buy, 1 portable water filter (that was a great demo tool, throw in beer and clean water comes out at the bottom, what more you need to convince someone), 4 or so regular water filters, 1 car air filter and about 4 or so small room air filters, total about 1000 dollars. All excited I went to their warehouse in Amsterdam as it was “cheaper” to go for the stuff yourself as I lifed only an hour away. So the routine now started, inviting friends and family, not really my cup of tea, I think most people dont like that idea so much, to the different meetings. We had every week a meeting in a hotel conversance room. You would pay for your guest to attend the meeting (5 dollars an invite) and the “professional speakers” would have a powerful presentation. One thing I must say the meetings and presentations were very professional and we had some convincing speakers. So how did I do, well I sold one water filter ( I still believe it was more a pity sale than anything else) , used the portable water filter for demo, but all the air filters… they just caught dust. I didnt recruited a person, but had a great learning experience, which I would not want to have missed in the world. We went with group to the Anthony Robbins seminar, even I walked over the hot fire coals at the end of the night. But MLM didnt make me any money, the main reason was I didnt believe in it. First of all the products were not really something I would use myself and secondly selling the products was something I wanted to do.  So why with this “Bad” experience in MLM, do I still to join Trivani? Well because of the different approach, first of all I like the products. The  “Do No Harm Philosopy” personal care products are great. Secondly I dont buy “stock that just sit catching dust”, just the products that I need for myself that month, which I would have bought anyhow that month. Thirdly the humantarian part of the business, the child guarding program. What Trivani call the Purpose, helping a less fortunate child (in Africa)

2- it was neither that I didnt like the products

The Trivani products are great. They have, Hair Care, Personal, Skin Care and Trivani Essential. To be a child guardian you spend minimum $135 a month, for that you get several products, which will be auto shipped to you every month and the great part is you can modify your order every month if you want, so if you still have enough “Greater Vision” ,  you just buy something else. That is what this program makes it different than my previous MLM experience. No MLM Stock that will catch dust

3- or dislike the concept,

See the concept of Trivani is really unique, as they call it they have PURPOSE. They have a humantarian part to the business. Part of their profit will go to projects all around the world to help people. (Trivani Foundation) and as a member you can become a child guardian. By just buying about $135 a month in products you will help a less fortunate child (in Africa).

4 – don’t believe in Multi Level Marketing, because it is a pyramid scheme

When I started NSA, my biggest fear was pyramid. That was one of my obsessions at that time,  because studied at the Technical University you will pick up your calculator and start to run the numbers…multiply and you will see soon that you run out of people :( … because the numbers get big fast and get a complete life by itself. Sure the numbers don’t lie, a pure pyramid, meaning your sponsored people will sponsor and the ones under them will keep on sponsoring, you will run out of people, that is a fact! However we dont live in a perfect scientifical world. People differ and most people will not take action, sadly enough that is the case. Even if you can motivate you group to super preform, you dont have to be scared that there will be no one to sponsor…it will take time to build your group and not everyone is moving at the same speed as you might want them to move. Another thing you have to keep in mind is that everything in life is build as a pyramid, Obama at the top, you are citizen at the bottom with all the politicians in between. Your boss at the top, you as worker at the bottom. So were does that leaves you with your pyramid believe? Well simple, you will build your own pyramid, where you are on top and your downline under you and depending on your motivation and desire you will build the largest group or you just will build a small one. Either one is fine, in life not everyone has the same desires, for some the money is very important, for other it is being spirtual and other again they so busy they dont know what keeps them going… However if you have a desire to make money, MLM is the best business to start as with a little investment you can build a hudge organisation and make some good money and your effort is basically the limit of what you can make!

So why didnt I join earlier I wasn’t just not ready for it. I had way to much thing going on, busy all the time and my motivation to make money wasnt really there. I was happy just doing what I wanted to do and have been doing that for the last 10 years. However I feel now that I am ready to take on the challenge and make some serious money… Bill Gates here I come :)

If you want to join me in my journey feel free to contact me or join up with Trivani

However just make sure you have the “tingle” that will set you in drive to propell you to the next level in life. With the right spirit you can get do whatever you want. Keep in mind it is you who controls your mind, so tell yourself you are worth the millions and join me, so we can do this adventure together, I am on the move, hop on the train, I am not waiting anymore…

This is an interesting concept. I have been using it now for a while and it is really cool. With out much promotion, i have now build up a crowd (as it is called in the bar “My Crowd”) of 180 people. Pretty amazing, to see the power of networking: Here is the breakdown of my crowd:

Level 1 41
Level 2 64
Level 3 49
Level 4 21
Level 5 3
Level 6 1
Level 7 1

As you can see I have contacted only 41 people myself (my first level of Get The Bar) and those people contacted 64 people (my second level Get The Bar). As you can see it is really important that you keep in good contact with your first level, your friends as they will really make your crowd grow. So it is really a good thing to keep in contact with them and let them now that how you are doing and give them some of your tips to promote this powerful advertising toolbar

This program is still very new and there is a lot of development still going on. However idea of getting paid for advertising you clicked is brillant. Especially combined with the targeted advertising, showing you advertising that “match” with what you like.

The Get The Bar is smart. They will show 5 ads o the side of your browser when you click the ER botton. Now here is the interesting part, you can only click 2 adds from the 5. This way the Bar is learning what you like. Because you will click the adds that appeal the most to you and this way the system will remember you preferences and will give targeted advertising.

The power of this program is the 7 levels deep that it will pay you. That means up to 7 levels deep all the clicks and activity “your crowd” is doing with Get The Bar will generate you money. The amounts are small for each click, but if your crowd is large those small numbers add up. And the best thing to join this program is Free, so you dont have anything to loose.

Most likely you will say, ya right, how can i make money and it is free. A very valid question, but the answer is simple. Just like how Google have the text advertising going and pays website owners for the click visitors make to the Google Adwords on their page, Get The Bar pays the users of the Bar. So the advertiser is paying you directly to view their ads, instead of with Google who  pays the Website owners.  And in a way that makes more sense, because it is the visitor that the one that is really important, that is the one that will interact with the advertisor. Either by buying his product or by joining his program or whatever the advertisor want as interaction with his visitors. And due to the fact the advertising is targeted the advertisor will be happy to pay you for the click, it is like how the jewelry store here give a drink to the customer when they come in and look at their merchandise. As you can see it is a win win situation.

Furthermore the advertising cost is a flat fee per click, no more bidding for the visitor, which will drive up the advertising costs.

Get The Bar - Money making Toolbar

Get The Bar - Money making Toolbar

The toolbar is only one of the sharing the advertising revenues. There are several other aspects in development, like SMS advertising and classifieds. I think it is a real powerful concept and you really should have a look at it and join it. Like I said it is free, so just try it and if you dont like it, well just uninstall, so go over to Get Paid At The Bar and join us. If you have any questions feel free to contact me and I will discuss it with the CEO of GetTheBar as we working together to make this product take off

One of the things I often do with my website is populate a Dropdownlist1 with information from a MYSQL database. Here is an example code which I use to do that:
[code language=”vb”]Dim myConnectionString As String = System.Configuration.ConfigurationManager.ConnectionStrings("myConnectionString").ConnectionString
Dim conn As MySqlConnection = New MySqlConnection(myConnectionString)
Dim cmd As MySqlCommand = New MySqlCommand(myConnectionString)
Dim sqlString As String = Nothing
Dim myConnection As New MySqlConnection(myConnectionString)
Dim myAdapter As MySqlDataAdapter = New MySqlDataAdapter(sqlString, myConnection)
Dim DS As DataSet = New DataSet

myAdapter.SelectCommand.CommandText = "select ID,MyDescription from Mydropdowntable"
myAdapter.Fill(DS)
Dim RText As String = "[Please Select]"
Me.Dropdownlist1.Items.Clear()
If DS.Tables(0).Rows.Count > 0 Then
For i As Integer = 0 To DS.Tables(0).Rows.Count – 1
Me.Dropdownlist1.Items.Insert(0, New ListItem(DS.Tables(0).Rows(i).Item(0).ToString, DS.Tables(0).Rows(i).Item(0).ToString))
Next
Else
RText = "Nothing Available"
End If
Me.Dropdownlist1.Items.Insert(0, New ListItem(RText, "0"))

myAdapter.Dispose()
myConnection.Dispose()
DS.Dispose()[/code].
I am connecting to a MYSQL database and are using Devart .Net Database connection with VS2008

You have to import the following at the beginning:
[code language=”vb”]Imports System.Data
Imports CoreLab.MySql[/code].

SEO Powered by Platinum SEO from Techblissonline