|
I would start with a database, then design a few tables. Follow up with either a windows app or better still and intranet app to allow the phone snumbers to be displayed. I would add an admin section for updfating and enable searching by last name, first name and number.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
?????
help me !
<< never believe a lie >>
modified on Friday, October 24, 2008 11:50 AM
|
|
|
|
|
What don't you understand?
You asked
Member 2645365 wrote: how i can make a phone book that work in my network.
and I gave you a way forward.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
If you don't understand his response get out of programming NOW.
Blog link to be reinstated at a later date.
|
|
|
|
|
Sounds like a plan to me. Don't forget to add an easter egg with a function called "ET_Phone_Home".
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
..that can only be accessed with a 'very long finger' method?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi
how i can display image in thumbnail mode in datagridview
|
|
|
|
|
please help me
<< never believe a lie >>
|
|
|
|
|
You need to size the image before displaying it, there is no facilty to resize in the grid as far as I know.
Member 2645365 wrote: please help me
You could to try help yourself - try Google!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi
how i can resize image and save in sql server ?
tanks
|
|
|
|
|
Create a new bitmap
Bitmap bmpResized = new Bitmap(width, height);
and draw the original bitmap in the new created bitmap
Graphics grph = Grphics.FromImage(bmpResized);
grph.DrawImage(...)
|
|
|
|
|
Eduard already answered for resize image.
so for save an image in SQL server, first convert the image into byte array and then store in database field which is image type. Follow following steps
1. first of all i assume PictureBox1 hold the picture data. So use following statement
Dim PictureBox1Data As Byte()<br />
If PictureBox1.Image Is Nothing Then<br />
PictureBox1Data = Nothing<br />
Else<br />
PictureBox1Data = imageToByteArray(PictureBox1.Image)'See below this function<br />
End If
2.Now write the SQL query as following
Dim QueryText As String<br />
Dim QueryValue As String<br />
Dim command As System.Data.SqlClient.SqlCommand = New System.Data.SqlClient.SqlCommand()<br />
QueryText = "INSERT INTO Settings(PrintCompany,IsUploadLogo,LogoGraphic )"<br />
QueryValue = "Values(@PrintCompany, @IsUploadLogo,@LogoGraphic)"<br />
command.CommandText = QueryText & QueryValue
3. Supply Value to parameter which is in above query, as following
command.Parameters.Add("@PrintCompany", SqlDbType.TinyInt, 10).Value = True<br />
command.Parameters.Add("@IsUploadLogo", SqlDbType.TinyInt, 10).Value =True<br />
If Not PictureBox1Data Is Nothing Then<br />
command.Parameters.Add("@LogoGraphic", SqlDbType.Image, PictureBox1Data.Length).Value = PictureBox1Data<br />
Else<br />
command.Parameters.Add("@LogoGraphic", SqlDbType.Image, 0).Value = System.DBNull.Value<br />
End If
4. Execute query as following
command.ExecuteNonQuery()
step 1 to 4 read data of picture box,convert them byte array and store in related table.Step 1 use following function to convert an image into byte array
Public Function imageToByteArray(ByVal ImageIn As System.Drawing.Image) As Byte()<br />
Dim ms As MemoryStream = New MemoryStream()<br />
Dim FormatImage1 As Imaging.ImageFormat = ImageIn.RawFormat<br />
ImageIn.Save(ms, FormatImage1)<br />
'ImageIn.Save(ms, Imaging.ImageFormat.Bmp)<br />
Return ms.ToArray()<br />
End Function
hope this helps
|
|
|
|
|
tank Rupesh Kumar Swami.
but , your code save image in database only. don 't resize it.
<< never believe a lie >>
|
|
|
|
|
Member 2645365 wrote: tank Rupesh Kumar Swami.
"Thanks" Rupesh.
Member 2645365 wrote: your code save image in database only. don 't resize it.
That's the code I needed to save the image to the database! I have tried it, and it doesn't resize the image. I will try to code this myself.
|
|
|
|
|
hi
differnce betwen Me.Close() and Me.Dispose() in vb.net
i used Me.close() to close the current Form in Windows application
and the same thing i done by using Me.Dispose()
it is also giving the same result
Then what is the differnce
thanks in advance
vijay kumar d
|
|
|
|
|
Hii
Functionality of Me.Close or Me.Dispose is same. but when you use the objects of the forms like
dim myForm as New frmWelcome
and when you use myform.close and then myform.show it shows old data on form but we you myform.dispose then myform.show it shows fresh form.
may it clears your confusion.
Thanx
Mitesh Khatri
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
~Khatri Mitesh~ wrote: when you use myform.close and then myform.show it shows old data on form but we you myform.dispose then myform.show it shows fresh form.
That is wrong. When you do that, it throws ObjectDisposedException .
|
|
|
|
|
Both are same. Both disposes the form and releases all unmanaged resources. The difference is only in semantic.
|
|
|
|
|
Dialogs (forms displayed with ShowDialog()) are just closed by Close(). You must use Dispose() to dispose the resources used by the dialog (unless you want to show that dialog instance again later).
For non-dialogs (forms displayed with Show()), Close() does the same as Dispose().
|
|
|
|
|
Hi all,
I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security. But I known OracleConnection Object build-in .Net without implement IxmlSerializable, in others words OracleConnection don't have ability Serializable.
Pls, help me. Give me introduction or some guide to pass Instance of OracleConnection to Client from Webservices.
Thank alot
Best Regard
Luc
|
|
|
|
|
lucdt wrote: I have a WebServices. I want to pass Instance of OracleConnection to Client because i don't want initialize a OracleConnection at Client for Security
You can't do that. The Oracle connection object is not serializable. All database operations should be handled by the WebService, not the client. The client and webservice should pass the data back and forth, not database objects like connections, dataadapters, commandbuilders, ...
|
|
|
|
|
Thank for quick reply !
I will chance my design.
Bests regards
|
|
|
|
|
You cannot do this and even if you could there's no point.
Separate your application logic to at least 4 different layers:
- database
- data access layer (the only layer that has to use OracleConnection)
- business logic layer
- UI layer
The layers communicate only with the layer above or underneath so the UI layer does not communicate with DAL and certainly not with the database.
There are several good walkthroughs and articles about this in the internet.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Thank for quick reply !
I will chance my design.
Bests regards
|
|
|
|
|
If ds.HasChanges Then
ds = New DataSet("Database")
Dim dsChanges As DataSet = ds.GetChanges()
Dim updateSQL As String = ("UPDATE CourseLearningOutcomeAssignment SET CoverageExtentID = ? WHERE LearningOutcomeID = ? AND CourseID =?")
da = New OleDbDataAdapter
Dim updateCmd As New OleDbCommand
updateCmd.Parameters.Add("CoverageExtentID", OleDbType.VarChar)
updateCmd.Parameters.Add("LearningOutcomeID", OleDbType.Integer)
updateCmd.Parameters.Add("CourseID", OleDbType.Integer)
updateCmd.Parameters("CoverageExtentID").Value = 2
updateCmd.Parameters("LearningOutcomeID").Value = 1
updateCmd.Parameters.Add("CourseID", OleDbType.Integer)
updateCmd.Parameters("CoverageExtentID").SourceColumn = "CoverageExtentID"
updateCmd.Parameters("LearningOutcomeID").SourceColumn = "LearningOutcomeID"
updateCmd.Parameters("CourseID").SourceVersion = DataRowVersion.Original
myConnection.Open()
da.Fill(ds, "viewcoursedata") <----- stops at this line of code.... with the error msg "The SelectCommand property has not been initialized before calling 'Fill"
DataGridView2.DataSource = ds.Tables("viewcoursedata")
da.Update(dsChanges, "viewcoursedata")
ds.AcceptChanges()
If updateCmd.ExecuteNonQuery() Then
MsgBox("Updated Successfully")
Else
MsgBox("Not updated Successfully")
End If
myConnection.Close()
The problem is when we try to update the datagrid with information weve entered it doesnt send it to the database, then it has an error at the line above.
Any help would be great! project due tonight!
|
|
|
|