|
please send to me code
Ahmed hassan
|
|
|
|
|
Please don't ask twice. Also, there is no code. DId you understand the answer ? I was wondering myself, if a computer is set up to be arabic, what other characters would you expect ? Or do you just mean to reject numbers and symbols ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You already asked before. Don't keep asking the same thing over and over. It is rude.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
As the title says. I need to directly connect two computers or devices that have my software using IP addreses. And to share files between the two computers.
Example.
I select from a list IP address that I previously obtained, I connect to that IP adress and upload or download some files from it.
How to handle such a transfer?
Any ideas?
Thank you!
|
|
|
|
|
One machine must be running some kind of server to handle it's end of the file transfer and the other must be running a client that talks to that server.
There are a ton of different ways to do this, but to get any kind of an answer you're going to have to be more specific about what you're doing. Are you transferring files as part of a peer-to-peer chat application? Is this a central server that's going to hold these files? Can you use a normal FTP server as part of your app? Do you know anything about writing app's that use sockets?
|
|
|
|
|
Good afternoon All
i have an Application in an Multiuser evironment, i have a Concurency Problem. i would like someone to Explain to me how to handle Concurency using thread, i would like to lock the Update Function when one of users is updating the records and unlock it when the process is done . here is an example of my code
Public Function SaveProperties_Lis(ByVal dsDAta As PropDAL.Dssearchlis) As PropDAL.Dssearchlis
Dim ws As PropDAL.Properties
Try
ws = New PropDAL.Properties
'check the Business Rules
Me.CheckRules_Lis(dsDAta)
'Updating the dataset
dsDAta.EndInit()
ws.UpdateLis_search(dsDAta)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Return dsDAta
End Function .
i have this Function in BLL(Business Logic Layer). i want to lock it , when another user is using it.
The Bll is running on the Client machine and its a DLL that is deployed with the Application. i need to trap the Concurency situation in the BLL. The code above is retreaving the data from the DAL(data Access Layer), so the BLL will create an object of a DAL and use the DAL functions, and the Client application will call the BLL for service by creating an object of BLL and use the methods of BLL that will use the methods of DAL, i have not prevented Concurency to a database,and thats what i want to do. i want to know how to achieve this in a multi user Environment.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Theading has nothing to do with concurrency issues in the database. This question is not answerable, as you've posted it.
Concurrency is a situation that your app must handle according to your business and data rules. Noone can tell you how to write an "all encompassing solution" to a problem you haven't explained yet.
Locking a table is NOT a good option since noone will be able to read that table until it's unlocked. This too will genereate it's own set of problems for your app. If you wanted to kill your SQL server's performance from your applications point of view, this is the way to do it.
From your description, it looks like you don't have a firm grasp of what data concurrency is, what situations cause concurrency violations, nor do you understand what your options are in handling various concurrency issues and what the implications are for each solution. I highly suggest reading up on data concurrency before you start throwing locks around that you really don't need.
Think about this situation. Say one copy of your app places a lock on the table, then crashes. When does the lock get removed??
You can read up more on Data Access and Concurrency issues in this[^], this[^], and these[^].
|
|
|
|
|
Hi!
I've the following problem:
I've two bitmap variables, and I want to check that they contain the same image or not.
If I try to use the "=" operator, I get an error message.
I wrote a function what examines every pixel (by setpixel and getpixel methods), but it makes the program very slow.
Isn't there a faster way?
Thanks in advance.
|
|
|
|
|
Because VB sucks, no. But, if you did this in C# and called it from a dll, you could use direct pixel access, like I do in my image processing articles, which would be faster.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Yes I had the same problem with get/setpixel. Here is what you do, create a file stream for each file then compare the file streams.
If you need an example just let me know (don't worry it's real simple). I don't have the exact commands for it memorized but I have code for something similar on my laptop and I can give it to you later if you want me to.
|
|
|
|
|
I'll be very grateful if you send me the code.
Much thanks
|
|
|
|
|
A few notes. This will compare 2 files of ANY format not just bitmaps. path1 and path2 are your file paths. This will only work if the files are the same format(if you compare a 32 bit and 24 bit bitmap it will always return false). Also I have not tested this but I think it is correct but if you get an error or problem just let me know. I don't think there is much overhead with filestreams but if it isn't real fast then try using the read command at the bottom to read it into arrays then compare the arrays instead of the filestreams. If you need to compare different formats or if you are looking for a way to get or set pixels then I know how to do that but it is a little more involved than this since you have to match up pixels and so forth and it requires some knowledge of the bitmap format.
Public Function CompareFiles(ByVal path1 As String, ByVal path2 As String) As Boolean<br />
Dim n As Integer, issame As Boolean = True, fstream1 As IO.FileStream, fstream2 As IO.FileStream<br />
<br />
'create streams<br />
fstream1 = New IO.FileStream(path1, IO.FileMode.Open, IO.FileAccess.Read)<br />
fstream2 = New IO.FileStream(path2, IO.FileMode.Open, IO.FileAccess.Read)<br />
<br />
'compares the streams<br />
If fstream1.Length = fstream2.Length Then<br />
For n = 0 To fstream1.Length<br />
If fstream1.ReadByte <> fstream2.ReadByte Then<br />
issame = False<br />
Exit For<br />
End If<br />
Next<br />
Else<br />
issame = False<br />
End If<br />
<br />
fstream1.Close()<br />
fstream2.Close()<br />
<br />
Return issame<br />
End Function
The file stream is basically like an array of bytes. You can manipulate any file with file streams and if you want to copy data to or from an array use these commands.
fstream1.Read(yourarray, youroffset, yourcount)<br />
fstream1.Write(yourarray, youroffset, yourcount)
|
|
|
|
|
Thanks
|
|
|
|
|
Hello every one
I am developing a VB 2005 Express. At times it happens that the connection to the server breaks. I want to give a option of retry, and connect to the server again
- But even after the network is up then also I am not able to access the server
- Also which is the exact Exception to be used when there is not network connection
|
|
|
|
|
Sounds like you have network issues, not issues in your code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
may be that is the case...
but i find the network working for other applications...
i am trying to test the application on network..
I happens that when the network drops due to some reason the application gets stuck..
so i was trying to get a solution like
- stop for some time and try again.
- when i was testing that condition i found even when the network comes back the application is not connecting...
i do not know what to do...
The only way application will work is to restart it, as of now..
What else can i try?
|
|
|
|
|
Your problem sounds that you have a application install at one terminal and then you are trying to use the database available on some remote system that could be a system available on LAN.
This error occor due to windows firewall go to the control panel of the server open the window firewall option and turn off it i think it will help you out
With Regards
Yogesh Agarwal
|
|
|
|
|
If the issue is with fire wall then how can i get the application running in the first pace??
|
|
|
|
|
Hi,
I get the following error while installing application built by
Installshield XI. I am using CR-XI
Error 1904.Module C:|Program Files\Common Files\Business
Objects\3.0\bin\craxdrt.dll failed to register. HRESULT -2147024770. Contact
your support personnel.
************
I try to double check all the independencies and even add all related CR-XI dll's
but then i always got that kind of error when i try to install my software i've made..
its freaken me out... i dont know what to do.. please anybody can help...
please anybody??
*********
Thank you in advance
modified on Thursday, December 20, 2007 3:18:58 AM
|
|
|
|
|
Hi
This problem occurs because using installshield didn't include the supporting dll and ocx required for the report printing this error occor when you try to view the crystal report in your application. to solve the problem you must include the runtime redistributble version for crystal report into your setup script.
hope this will help you out
with regards
Yogesh Agarwal
|
|
|
|
|
Thanks a lot for your help.. ahehe
silly me... ahehe i forgot to include the crystalreport11_5_rdc_runtime merge module..
for me to support the module dependencies...
ahehehe...
thanks again...
|
|
|
|
|
I am reading a csv file and showing the data in the grid by with the following code
Dim oCon As OdbcConnection ', oDS As New DataSet
ods = New DataSet
'Dim oDA As OdbcDataAdapter
Dim sConString As String
' Dim sFolder As String
' Dim sFile As String
'Folder where csv file is located
sFolder = "C:\"
'csv Filename
sFile = "Template.csv"
sConString = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" & sFolder & ";"
oCon = New OdbcConnection(sConString)
oda = New OdbcDataAdapter("Select * From [" + sFile + "]", oCon)
oda.Fill(ods)
dtGridFile.DataSource = ods.Tables(0).DefaultView
Now the problem is that I have one field with contains '0000' but it is showing only '0' in the grid and when I try to run the query on the bases of this field it does not return the records becoz In dataset it is only '0' while in database field contains '0000'.
How I can get have the same values in the dataset as I have in csv file?
Thanks in advance
|
|
|
|
|
You need to "explain" to the code that '0000' is a string and not a number.
You could try it by adapting the sql, something like this:
"Select CAST(YourQuadrupleZeroField AS NVARCHAR(4)) as YourQuadrupleZeroField From [" + sFile + "]"
Remember that the 4 should be the maximum possible length (number of characters) of that field.
Hope it helps,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
The field containing '0000' is a varchar field.I am using Oracle database.
I need to read all the fields not only one field so that's why using
"Select * from [" + sFile + "]"
There are more than 25 fields in the file.
|
|
|
|