16,020,822 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by TugBest (Top 37 by date)
TugBest
28-Jul-14 14:18pm
View
thank you very much for all you answers ........I do apppreciate your great intellectual knowledges tanks a lot....
TugBest
28-Jul-14 14:18pm
View
thank you very much for all you answers ........I do apppreciate your great intellectual knowledges tanks a lot....
TugBest
28-Jul-14 13:14pm
View
Thank very Much Richard for Your answers ...i really appreciate it
but i got another error at this side below like::::::Keyword not supported: 'provider'.
Using connection As New SqlConnection(connectionString)
TugBest
28-Jul-14 13:04pm
View
this side below gives error like:::::: Object reference not set to an instance of an object.
Dim connectionString As String = ConfigurationManager.ConnectionStrings("provider=sqloledb;Data Source=(local);Initial Catalog=AdmINDB;Integrated Security=SSPI").ConnectionString
TugBest
28-Jul-14 11:35am
View
i didnt even use any 'WITH' in the Update statement . But it updates successfully when i type just few words and sentences. But when i Type something like this : : : : : : : :::
"So as you can see; an index is not something publishers put at the end of the book because of tradition. It is included to help readers locate important information contained in the text.
Indexes should support all levels of user subject experience. Some are expert with the book title and can easily understand your index topics and reach what they are looking for, but others are novice readers with the book title and may find difficulties if your index topics are hard to be understood till they reach what they are looking for."""""
WHEN I TYPE somthing sentences and text as many as the few sentences above.. it will give error like::::::
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon. Incorrect syntax near the keyword 'with'.
TugBest
28-Jul-14 7:31am
View
Please i need help...
I get NO errors when i type few sentences in the CommentsTextbox but when i type long sentences and more words and i try to Update or Insert i get the errors below:
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a Semicolon.
this is my Sql String:
"update set IDNo='" + IDNOTextBox.Text + "',Comments='" + CommentsTextBox.Text + "' where Prescriptions like '" + TextBox1.Text + "%'"
i will appreciate it i a get an answer.....thanks in advance
TugBest
1-Jul-14 13:43pm
View
tank u sooo much
TugBest
1-Jul-14 13:42pm
View
tank u very much ..i really appreciate it,,
TugBest
25-Jun-14 10:44am
View
THIS IS MY CONNECTION STRING:
Dim strcon As String = "provider=sqloledb;Data Source=(local);Initial Catalog=TUGdB;Integrated Security=SSPI"
TugBest
25-Jun-14 10:43am
View
thank you very much for ur answers i really appreciate it....
But one more thing is that do i need to install the whole sql server on all the other computers or i have to only install the applications which was created from my vb.net program
THIS IS MY CONNECTION STRING:
Dim strcon As String = "provider=sqloledb;Data Source=(local);Initial Catalog=TUGdB;Integrated Security=SSPI"
TugBest
25-Jun-14 10:39am
View
thank you very much for ur answers i really appreciate it....
But one more thing is that do i need to install the whole sql server on all the other computers or i have to only install the applications which was created from my vb.net
TugBest
11-Jul-13 9:25am
View
ok tanks
TugBest
10-Jul-13 10:21am
View
what is parameterized query, i dont tnk i hav got an answer. By your comment it means that my image is not actually saving in the database....so what can i do to save it into the database and later retrieve it into a picture box.....
TugBest
10-Jul-13 9:51am
View
it display as system.byte[] when i write to file
TugBest
10-Jul-13 9:27am
View
any way my datatype for the Picture field in SQL is (IMAGE)
TugBest
10-Jul-13 9:19am
View
am still trying to write it
....what does it mean if i can read the data as like English
TugBest
10-Jul-13 8:59am
View
so shud i change the datatype for the Picture field in sql the table.
cos is used a smilar code and it worked with Ms Acess but with SQL it doesnt work....the datatype in Ms Acess was ..attachment
TugBest
10-Jul-13 8:30am
View
thank u very much for the help so far...i really appreciate that
but when i click on the button to save it .....i check from the sql table and see that the picture field has become (binary data) meaning it has saved it
so how can i save the image content and later retrieve it into a picture box by using a search box
TugBest
10-Jul-13 8:12am
View
Dim strsql As String = "insert into PersonalPro(SurNames,Gender,DOB,pictu)values('" + SurNamesTextBox.Text + "','" + GenderComboBox.Text + "','" + DOBDateTimePicker.Text + "','"+ PictuPictureBox.ImageLocation + "')"
Dim strcon As String = "provider=sqloledb;Data Source=GH-PC;Initial Catalog=stdata;Integrated Security=SSPI"
Dim odapre As New OleDb.OleDbDataAdapter(strsql, strcon)
Dim datTable As New DataTable
odapre.Fill(datTable)
MsgBox("Successfully Done", MsgBoxStyle.Information, "DONE")
this code saves it into the database as (binary data)
but am havin errors when i decide to retrieve this from the database into a picture box ..... that is when i use the code below
Dim bytBLOBData() As Byte = datTable.Rows(incount)("Pictu")
Dim stmBLOBData As New IO.MemoryStream(bytBLOBData) PictuPictureBox.Image = Image.FromStream(stmBLOBData)----(parameter is not valid)
TugBest
9-Jul-13 14:58pm
View
still getting errors
perhaps how can i alter my code into yours
Dim bytBLOBData() As Byte = datTable.Rows(incount)("Pictu")
Dim stmBLOBData As New IO.MemoryStream(bytBLOBData)
PictuPictureBox.Image = Image.FromStream(stmBLOBData)----(parameter is not valid)
TugBest
8-Jul-13 8:59am
View
how do i make it into a byte array....
am having trouble changing it to a byte array..
TugBest
5-Jul-13 8:16am
View
OK ....what about this one :.....
Dim strsql As String = "insert into PersonalPro(SurNames,Gender,Pictu) values ('"+SurNamesTextBox.Text + "','" + GenderComboBox.Text + "','" + PictuPictureBox.ImageLocation + "')"
Dim strcon As String = "provider=sqloledb;Data Source=vv-PC;Initial Catalog=immdata;Integrated Security=SSPI"
Dim oda As New OleDb.OleDbDataAdapter(strsql, strcon)
Dim dTable As New DTable
oda.Fill(dTable)
TugBest
5-Jul-13 7:58am
View
CODE:
Dim strsql As String = "insert into PersonalPro(SurNames,Gender,Pictu SurNamesTextBox.Text + "','" + GenderComboBox.Text + "','" + PictuPictureBox.ImageLocation + "')"
Dim strcon As String = "provider=sqloledb;Data Source=vv-PC;Initial Catalog=immdata;Integrated Security=SSPI"
Dim oda As New OleDb.OleDbDataAdapter(strsql, strcon)
Dim dTable As New DTable
oda.Fill(dTable)
TugBest
4-Jul-13 10:13am
View
when i check the SQL db content i can see that it has written <binarydata> in the column where i insert the image from the vb platform...but i wanted to display what is in that column...i guess it is the image i inserted which displays in the SQL DB COLUMN as <binary data="">
its like
NAME ADDRESS AGE PICTURE
kofi plt streeT 12 <binary data="">
I did not use the same code to insert it into the DB I used an INSERT STATEMENT .....
Any way my datatype in Ms Acess was Attachment and In SQL is selected IMAGE as my datatype.
THIS IS THE CODE... I USED TO PICK THE IMAGE INTO THE PICTURE BOX and saved it with insert statement
With OpenFileDialog1 'Executes a series of statements making repeated reference to a single object or structure.
.Title = "Please Select a Image" 'title
.InitialDirectory = "C:\" 'browse start directory
.Filter = "JPEG(*.jpg;*.jpeg;*.jpe.*.jfif)|*.jpg; *.jpeg; *.jpe; *.jpe"
.FilterIndex = 0 'index number filter
.FileName = "" 'empty
Dim answ = .ShowDialog
If answ = DialogResult.OK Then 'if answer not cancel, etc..
PictuPictureBox.ImageLocation = .FileName 'picterebox imagelocation = dlg_openfile.filename
'PictuPictureBox.Image = Image.FromFile(OpenFileDialog1.FileName)
End If
End With
Any way my datatype in Ms Acess was Attachment and In SQL i selected IMAGE as my datatype.
TugBest
4-Jul-13 9:50am
View
thanks....but my code works in MS access to retrieve image from database but when i use SQL it doesnt work....and right now am using SQL DATABASE
TugBest
15-Dec-12 10:12am
View
i want matching values with input to be shown from my database with the matching picture in a picturebox. Everything works when i comment out the picture code.
so i need a little help for the picture to display in a picturebox.
i have erors like:- ("Unable to cast object of type 'System.Byte[]' to type 'System.Drawing.Image'")
THIS IS MA CODE:
Dim strsql As String = "select FullName,DateofBirth,Emailaddress,Pictures from EntDb where FullName like('" + TextBox11.Text + "%')" Dim strcon As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Avo\Documents\chk.accdb" Dim odapre As New OleDb.OleDbDataAdapter(strsql, strcon) Dim datTable As New DataTable Dim incount As Integer odapre.Fill(datTable)
For incount = 0 To datTable.Rows.Count - 1
FullNameTextBox1.Text = datTable.Rows(incount)("Fullname").ToString
DateofBirthDateTimePicker.Text = datTable.Rows(incount("DateofBirth").ToString
EmailaddressTextBox.Text = datTable.Rows(incount)("Emailaddress").ToString
' PicturesPictureBox1.image = datTable.Rows(incount)("Pictures")
next
end sub
TugBest
15-Dec-12 7:54am
View
thanks very much
i Code this code and it is working perfecting for my results displaying in the text boxes. but my results must come with a picture in a picturebox on the form. I don't how i can get my picture to display in the picture box with the other search results in the textboxes.
THIS IS THE CODE BELOW.
NB: the commented code is where am facing problem.
Dim strsql As String = "select FullName,DateofBirth,Emailaddressfrom Entdb where FullName like('" + TextBox11.Text + "%')"
Dim strcon As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Avo\Documents\chk.accdb"
Dim odapre As New OleDb.OleDbDataAdapter(strsql, strcon)
Dim datTable As New DataTable
Dim incount As Integer
odapre.Fill(datTable)
For incount = 0 To datTable.Rows.Count - 1
FullNameTextBox1.Text = datTable.Rows(incount)("Fullname").ToString
DateofBirthDateTimePicker.Text = datTable.Rows(incount)("DateofBirth").ToString
EmailaddressTextBox.Text = datTable.Rows(incount)("Emailaddress").ToString
' PicturesPictureBox1. = datTable.Rows(incount)("Pictures")
next
end sub
TugBest
15-Dec-12 7:47am
View
i Code this code and it is working perfecting for my results displaying in the text boxes. but my results must come with a picture in a picturebox on the form. I don't how i can get my picture to display in the picture box with the other search results in the textboxes.
i have erors like:- ("Unable to cast object of type 'System.Byte[]' to type 'System.Drawing.Image'")
THIS IS THE CODE BELOW.
NB: the commented code is where am facing problem.
Dim strsql As String = "select FullName,DateofBirth,Emailaddress,Pictures from EntDb where FullName like('" + TextBox11.Text + "%')"
Dim strcon As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Avo\Documents\chk.accdb"
Dim odapre As New OleDb.OleDbDataAdapter(strsql, strcon)
Dim datTable As New DataTable
Dim incount As Integer
odapre.Fill(datTable)
For incount = 0 To datTable.Rows.Count - 1
FullNameTextBox1.Text = datTable.Rows(incount)("Fullname").ToString
DateofBirthDateTimePicker.Text = datTable.Rows(incount)("DateofBirth").ToString
EmailaddressTextBox.Text = datTable.Rows(incount)("Emailaddress").ToString
' PicturesPictureBox1. = datTable.Rows(incount)("Pictures")
next
end sub
TugBest
11-Feb-12 11:00am
View
thanks...
TugBest
31-Dec-11 9:12am
View
thanks
TugBest
2-Sep-11 9:34am
View
Jason I want to ask another question.This one is about crystal report.My question is I have developed a project using crystal report, and I want to install the build setup on a client computer. I have been able to build the setup from my project and installed it on the client computer but when I ask it to display the crystal report it gives me an (error not able to display crystal report) I tried installing crystal report separately from the vb.net setup file but it doesn't display the crystal report, but I had to install vb.net on the client computer before the crystal report could load.so I want help me to display my crystal report viewer on a client computer without installing the vb.net setup.I need Help.
TugBest
2-Sep-11 9:23am
View
thank very much Jason.It worked perfectly God bless you
TugBest
1-Sep-11 15:25pm
View
Thank you very much..Jason! Now am trying to create the database from the the localdatase item in vb.net thus SQL Express..but when I finish creating and conencting the database I then drag the tables onto the forms from the data source which gives me a binding source , table adaptor and binding Navigator., but when I run the project it gives me an error like(Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)..so in this way it displays the form alright but it doesn't have any of the records from the database I created .Please I need your help.
TugBest
23-Jun-11 17:59pm
View
Deleted
this is the code that i tried....
pls help
For Each row As DataGridViewRow In Me.DataGridView1.Rows
If Not row.IsNewRow Then
Dim line As String = String.Empty
For x As Integer = 0 To row.Cells.Count - 1
line &= row.Cells(x).Value & " " & vbCr.PadRight(10)
Next
objectwriter.WriteLine(line.Remove(line.Length - 1, 1))
TugBest
18-Jun-11 7:10am
View
thank u very much for your code...but the problem still exist.. it did not arrange the text contents into rows and columns like in the datagridview..please help me if u have another answer to my problem.. thanks once again
TugBest
16-May-11 18:15pm
View
i want to know if datagride view can be displayed without SQL or ACcess of any database program .. how is it done..
2. how can i also create a dataset programatically.....
TugBest
16-May-11 18:13pm
View
thank u very very much for this code...but i also want to know if i can display a datagride view without SQL or Access of any data base program....how can this be done
Show More