hello, i have a MySql, .net framework 3.5 windows application software running in my pc. i want to install windows application software in other pc which is connected using LAN. But application has to access the My Sql database which is in My pc. i am using DSN connection.
garga1
Posts
-
How to connect Mysql database in Lan -
To get width and height of a image from serverSir, This is the error i'm getting.. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source Error: Line 42: Line 43: Public Sub CheckWH() Line 44: Dim fullSizeImg As System.Drawing.Image = System.Drawing.Image.FromFile(str) Line 45: Line 46: Source File: D:\Hosting\5201676\html\Gallery.aspx.vb Line: 44 i think it is giving error for FromFile(str). Whether FromFile() is used only to get path from localhost ? Plse reply..
-
To get width and height of a image from serverSir, Thank you for reply.. There is permission for folder and path is also exist.
-
To get width and height of a image from serverHi frnds, I hv a code to get width and height of image in a file. Image is stored in folder and imagename in database.. I'm using asp.net 2.0 and sqlserver 2005. Dim width,Height as integer ImgPath = "~/Photos/" & ImgName Dim fullSizeImg As System.Drawing.Image = System.Drawing.Image.FromFile(ImgPath) width = fullSizeImg.Width Height = fullSizeImg.Height This works only in localhost. But after uploading to server it is not working. Is ther any other method to get the width and height of the image from server..?
-
how to get imageurl of Dynamically created Image Button in click event ?Sir, i also did the same thing using foll vb code AddHandler Img.Click, AddressOf Me.Img_Click i want to know how to get imageurl or the path of the image so that i can open it in new window when i click the image button in foll function. protected void Imgbtn_Click(object sender, EventArgs e) { //code }
-
how to get imageurl of Dynamically created Image Button in click event ?Hi sir, I have created dynamic imagebuttons. In that postbackurl was not working. So i wrote addhandler. I want to open selected image in new window. How to call the selected image id or get the imageurl in img_Click event..? Dim tRow5 As New HtmlTableRow() tblParticulars.Rows.Add(tRow5) tCell = New HtmlTableCell() tCell.Align = "Left" tCell.Width = 300 Dim Img As New ImageButton Img.ID = "AdvImg" & cnt Txt1 = Ds1.Tables(0).Rows(i).Item("AdvImg") Img.ImageUrl = "~/Photos/" & Txt1 Img.Height = "70" Img.Width = "60" AddHandler Img.Click, AddressOf Me.Img_Click tCell.Controls.Add(Img) tRow5.Cells.Add(tCell) Private Sub img_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) End Sub
-
Displaying image in image controlCan anybody tell me how to retrieve a image from ms access 2003 and bind it to image control.. i hv retrieved image successfully in a new page. But want to bind it to Image control. My code is as following : Uploading to Ms access // This code works fine Dim intImageSize As Int64 Dim strImageType As String Dim ImageStream As Stream intImageSize = File1.PostedFile.ContentLength strImageType = File1.PostedFile.ContentType ImageStream = File1.PostedFile.InputStream Dim ImageContent(intImageSize) As Byte Dim intStatus As Integer intStatus = ImageStream.Read(ImageContent, 0, intImageSize) Dim MyConnection As New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\MyDataBase.mdb") & "") Dim MyCommand As New Data.OleDb.OleDbCommand("INSERT INTO Images (ImageType,ImageData) VALUES (@ImgType,@img)", MyConnection) Dim prImageType As New Data.OleDb.OleDbParameter("@ImgType", 255) prImageType.Value = strImageType MyCommand.Parameters.Add(prImageType) Dim prImage As New Data.OleDb.OleDbParameter("@img", 255) prImage.Value = ImageContent MyCommand.Parameters.Add(prImage) MyConnection.Open() MyCommand.ExecuteNonQuery() MyConnection.Close() Retrieving Images from Msaccess Dim MyConnection As New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\MyDataBase.mdb") & "") Dim MyCommand As New Data.OleDb.OleDbCommand("Select * from Images", MyConnection) MyConnection.Open() Dim myDataReader As Data.OleDb.OleDbDataReader myDataReader = MyCommand.ExecuteReader() ' myDataReader = MyCommand.ExecuteReader(CommandBehavior.CloseConnection) Do While (myDataReader.Read()) 'Response.ContentType = myDataReader.Item("ImageType") 'Response.BinaryWrite(myDataReader.Item("ImageData")) Loop MyConnection.Close() Thanks..
-
Problem in QueryThanks yaar. It works.. But can we get a output like this : 1945 1950 1960 t1 t4 t6 t2 t5 t7 t3 i hv also added group by. But it doesn't work..
-
Problem in QueryHi Friends, I hv got 2 fields in a table. Year and title. year Title 1945 t1 1945 t2 1945 t3 i want a query to retrieve answer like foll. : 1945 //Field name t1 t2 t3 1945 should be a field name and under that i need 3 rows where i can display title values.. Thanks in advance
-
Send data to Text file in FlashCan anybody tell me how to send data to text file from flash 8. My code is : // This is written in Flash myData = new LoadVars(); myData.onLoad = function(){ if(this.writing==”Ok”) { trace (”Data saved”); } else { trace(”Data Not saved”); } } Submit.onPress=function() { myData.notes = notes.text; trace(myData.notes); myData.sendAndLoad(”save.[php”, myData, “POST”); notes.text=”"; } //Code in PHP <?php //Capture data from $_POST array $notes = $_POST[’notes’]; //Make one big string in a format Flash understand $toSave =$notes; echo $notes; //Open a file in write mode $fp = fopen(”E:\ABAP\NotesFile.txt”, “w”); if(fwrite($fp, $toSave)) echo “writing=Ok&”; else echo “writing=Error&”; fclose($fp); ?> Still it doesn’t work. It doesn’t save data in text file and shows Data not saved message..
-
Creating a batch File to enable download signed activex controlCan anybody tell me how to enable download signed activex control (Tools - > Internet options - > Security - > Custome level )through batch file.. If i double click on that batch file it should enable that activex control........... Thanks
-
change width and height of internet explorerThank you sir.. This code works fine
-
change width and height of internet explorerCan anybody tell me how to change the width and height of internet explorer when html page loads(Example:150px * 100 px) . i hv written the foll. codes inside body tag style="max-width: 133px;max-height: 20px" but it is not working. Thanks
-
Problem with Connection StringThanks.. Thanks for everyone.. I got the solution..
-
Problem with Connection StringThanks.. But plse tell me how to give the path..
-
Problem with Connection StringHi Frnds.. I hv developed a Bill Contract Software in Vb.Net 2005(Windows application) , using vb as a language and msaccess as backend. I want to store all the data in the server. So i hv copied msaccess file to my personal domain inside wwwroot folder. Now i dont want to store data in my PC. It should be stored in the server directly. Can anyone tell me what is the connection string for that... Thank you...
-
Plse help me..Thanks.. thanks a lot
-
Plse help me..I hv downloaded following codes to save image from vb.net 2005 to Mysql. Private Sub cmdSaveDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSaveDB.Click If picShowPicture.Image Is Nothing Then Exit Sub Dim ms As MemoryStream = New MemoryStream picShowPicture.Image.Save(ms, ImageFormat.Jpeg) Dim bytBLOBData(ms.Length - 1) As Byte ms.Position = 0 ms.Read(bytBLOBData, 0, ms.Length) Dim prm As New MySql.Data.MySqlClient.MySqlParameter("@BLOBData", _ MySql.Data.MySqlClient.MySqlDbType.Blob, _ bytBLOBData.Length, ParameterDirection.Input, False, _ 0, 0, Nothing, DataRowVersion.Current, bytBLOBData) Dim ConnectionString As String = "SERVER=localhost;" & _ "PORT=3306;DATABASE=pictureDB;User Id=root;" & _ "PASSWORD=pass;" Dim QueryString As String = "INSERT INTO blobtest ( BLOBData ) VALUES ( @BLOBData )" MsgBox(QueryString) Dim myConnection As New MySqlConnection(ConnectionString) Dim myCommand As New MySqlCommand(QueryString) myCommand.Connection = myConnection myCommand.Parameters.Add(prm) 'Open the connection myConnection.Open() 'Execute the query myCommand.ExecuteNonQuery() 'Close the connection myConnection.Close() End Sub But it is giving me a error saying imageformat is not declared.. How to solve it.. Plse help me..
-
Store and Retrieve ImageCan anyone send me the code or link how to Store and retrieve images from Sql server 2000. I'm using Asp.net 2.0 as front end.?? Plse help me...
-
To create Hit Counter in Asp.NetFriends, Plse tell me how to create hit counter(should display in textbox or label) in Asp.Net using notepad. I dont want to have any database. When page loads texbox(or label) value should be incremented by 1. Plse help me... Thank you...