16,018,797 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 tarhex (Top 57 by date)
tarhex
18-Aug-13 3:36am
View
thanks, bro. I just need a head start, that is how I can achieve this. I can program using php, jquery, Ajax to some extent.
tarhex
26-Jul-13 2:52am
View
thanks, this is what I have tried RewriteCond %
{REQUEST_FILENAME} !-f RewriteCond %
{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /
folder1/folder2/folder3/$1 [L] I want to hide
the subfolders
tarhex
26-Jul-13 2:21am
View
thanks, this is what I have tried
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /folder1/folder2/folder3/$1 [L]
I want to hide the subfolders
tarhex
20-Jul-13 9:37am
View
thanks, please an example will do
tarhex
20-Jul-13 9:18am
View
This I know but how to get it from the URL. e.g www.example. com?name=johndoe, I can use the $_GET['name'] to use the data in PHP but how can get the name from www.example.com/johndoe
tarhex
20-Jul-13 7:31am
View
yes, bro. I have a page with the information, just how to access it using a username from the address bar
tarhex
10-Jul-13 20:26pm
View
thanks, bro. I appreciates
tarhex
10-Jul-13 19:46pm
View
ok, thanks for the hint.
<!--?php
$host = "localhost"; $db = "sample"; $user = "admin"; $pass = "tarhe";
$conn = new PDO("mysql:host=$host;dbname=$db",$user,$pass);
$sql = "SELECT * FROM search_info";
$q = $conn-?-->query($sql) or die("failed!");
$r = $q->fetch(PDO::FETCH_BOTH);
echo $r['userid']; ?>
In the place of fetch, I found out that fetch_assoc or fetch_both and some others can be used, they all produce the same result and I can't seem to find the difference.</xml?-->
tarhex
10-Jul-13 18:33pm
View
Deleted
<!--?php
$host = "localhost";
$db = "sample";
$user = "admin";
$pass = "tarhe";
$conn = new PDO("mysql:host=$host;dbname=$db",$user,$pass);
$sql = "SELECT * FROM search_info";$q = $conn-?-->query($sql) or die("failed!");
$r = $q->fetch(PDO::FETCH_BOTH);
echo $r['userid'];
?>
In the place of fetch, I found out that fetch_assoc or fetch_both and some others can be used, they all produce the same result and I can't seem to find the difference.</xml?-->
tarhex
10-Jul-13 17:53pm
View
which is the best to use:
fetch_assoc or fetch_both or fetch_num
tarhex
9-Jul-13 8:07am
View
Blimey, thanks bro. As easy as ABC.
tarhex
9-Jul-13 7:31am
View
I meant I couldn't get information on how to build a system like that.
tarhex
3-Jul-13 7:52am
View
Never worked
tarhex
23-May-13 0:32am
View
I still don't understand you, bro.
tarhex
22-May-13 16:17pm
View
How can I do that?
tarhex
22-May-13 16:16pm
View
I have changed from 4 to 3 to even 2, error still exist
tarhex
22-May-13 9:37am
View
all of my project have this error
tarhex
26-Apr-13 18:29pm
View
OK, first things first. Have you being able to retrieved the details of the equipment?
What you want now is how to update the database to show equipment returned to reflect that it has being returned?
tarhex
22-Apr-13 3:05am
View
Are you adding data to database or retrieving from database?
The sample code I posted is to retrieve from database. post your code below let me see so that I can really help.
tarhex
18-Apr-13 15:32pm
View
I have solved it myself
tarhex
18-Apr-13 14:41pm
View
Dim cmd As OleDbCommand = New OleDbCommand("SELECT ID,amt,last_pay_date FROM details WHERE ID= " & ID & " ", conn)
In the code above, the "ID,amt,last_pay_date" are the columns (details) that can be displayed (in your case, equipment details). The "Details" is the name of the Table in the database.
tarhex
12-Apr-13 9:40am
View
Thanks for your help. I didn't get what I wanted. I want to display the PDF file on Adobe Reader as it is being read from the database.
tarhex
12-Apr-13 8:15am
View
I can help you but I need to know where you want the details to be displayed. Is it on Textboxes or DataGridView
tarhex
12-Apr-13 8:12am
View
Try
'string to hold file name and stream
Dim fileStream As Stream
openDialogBox.InitialDirectory = "c:\backup\" 'initial directory
openDialogBox.Filter = "Software Database files (*.mdf)|*.mdf" 'file filters
openDialogBox.RestoreDirectory = True
' If user selects OK, store file name and stream.
If (openDialogBox.ShowDialog() = DialogResult.OK) Then
fileName = openDialogBox.FileName
fileStream = openDialogBox.OpenFile()
fileStream.Close()
System.IO.File.Delete(Application.StartupPath & "\db\dbase.mdf")
System.IO.File.Copy(fileName, Application.StartupPath & "\db\dbase.mdf")
Dim mymsg1 As New myMsgbox
'show user where to click to upload logo
With mymsg1
.txtError.Text = "Database Restored Successfully!"
.ShowDialog()
End With
End If
Catch ex As Exception
Dim mymsg1 As New myMsgbox
With mymsg1
.txtError.Text = "Error! Could Not Restore Database, try again!"
.ShowDialog()
End With
End Try
openDialogBox.Dispose()
tarhex
12-Apr-13 8:04am
View
'backup database
Try
Dim backupdate, newname As String
'backup database
backupdate = DateString
newname = "C:\backup\dbase" & "" + backupdate + "" & ".mdf"
'check if a current day backup exist
If System.IO.File.Exists(newname) Then
'if yes, delete the former backup and backup the new one the new one
System.IO.File.Delete(newname)
System.IO.File.Copy(Application.StartupPath & "\db\dbase.mdf", newname)
Else
'backup database
System.IO.File.Copy(Application.StartupPath & "\db\dbase.mdf", newname)
End If
Dim mymsg As New myMsgbox
'show user where to click to upload logo
With mymsg
.txtError.Text = "Database Backup Successful!"
.ShowDialog()
End With
Catch ex As Exception
Dim mymsg As New myMsgbox
'show user where to click to upload logo
With mymsg
.txtError.Text = "Error Backing Up Database, try again later!"
.ShowDialog()
End With
End Try
tarhex
11-Apr-13 17:34pm
View
You want equipment details based on the ID entered?
tarhex
28-Mar-13 15:18pm
View
ok, thanks
tarhex
28-Mar-13 13:33pm
View
I have a question, how do I compile for 32 bit.
tarhex
28-Mar-13 12:58pm
View
@Maciej Los those are the files i downloaded and here is my connection string
Dim cnxn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.StartupPath & "\data\dbase.accd" + " ;Jet OLEDB:Database Password=mend;")
tarhex
28-Mar-13 12:50pm
View
I think those files I downloaded are the ACE database engine files. But if compiling in 32 bit without installing any additional file will solve the problem, I will stick with that. Thanks, Big Bro.
tarhex
28-Mar-13 12:13pm
View
If I compile for 32 bit only, will the error be avoided?
Can I use the ACE database engine with my current database (MS Access 2007)?
Is the ACE not a kind of a connection string?
tarhex
28-Mar-13 11:49am
View
Ok, what do you suggest I do because there is a possibility that the program might be deployed in a 64 bit computer.
tarhex
24-Mar-13 5:43am
View
it worked perfectly
tarhex
24-Mar-13 2:19am
View
OK, i will try that out. Thanks big bro
tarhex
24-Mar-13 2:11am
View
i wanted to display the user ID. The user can have more than one entry in the table.
tarhex
24-Mar-13 0:49am
View
thanks big bro. I have a unique ID as the primary key for registered person.
tarhex
23-Mar-13 22:52pm
View
Deleted
Just putting this down for those who are having this kind of problem or those who don't know what the problem is when they encounter it. You will mainly encounter this problem when you put the datagrid on a groupbox that is in a tabpage and you make the groupbox background colour transparent. To solve this problem, remove the datagrid from the groupbox.
tarhex
18-Mar-13 7:13am
View
Big Bro, i finally got it done. Although i can't still figure what really went wrong or explain it. What i did is to recreate a new tabpage and i left the default name (tabpage1) but just changed the text to desirable name. I also created a new datagrid and it did the magic. Thanks bro, i really appreciate.
tarhex
18-Mar-13 6:34am
View
tried it, nothing happened, it still the same.
tarhex
18-Mar-13 6:13am
View
Trying that now. Thanks for your time so far.
tarhex
18-Mar-13 5:39am
View
Here is the picture of the datagrid
http://social.msdn.microsoft.com/Forums/getfile/259101
tarhex
18-Mar-13 5:37am
View
The columns are loaded dynamically.
tarhex
18-Mar-13 4:33am
View
I did that and nothing happened. How can i post a picture so that you can see the columns. thanks for help so far.
tarhex
17-Mar-13 16:47pm
View
it normally works for me if i program it as it is above, i suspect there is a kinda undocumented problem with tab control with data grid
tarhex
17-Mar-13 15:54pm
View
Deleted
here is my code:
tab click event:
<pre lang="vb">Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
If TabControl1.SelectedIndex = 5 Then
'load symptoms
loadSymptomsCmb()
'load patient diagnosis history
loadDiagnosisHistory(mqhModule.treatPatID)
'show doc name
txtDoc.Text = mqhModule.docName
ElseIf TabControl1.SelectedIndex = 6 Then
'load prescription history
loadprescription(mqhModule.treatPatID)
'load drugs
loadDrugsCmb()
'show doc name
txtDrugsBy.Text = mqhModule.docName
End If
End Sub</pre>
code to populate datagrid:
<pre lang="vb">Private Sub loadprescription(ByRef patID As String)
Try
'retrieve patient info
'retrieve patient info
'open database
conMod.openDB()
'get first student name list from database
Dim StrSQL As New SqlDataAdapter("SELECT drugs,medicine,dura,dosage,freq,drugInstruction " & _
"presTime,presDate,prescribeby " & _
" FROM patientprescription WHERE patientID='" & patID & "' ", conMod.Con)
Dim DR As New DataSet
StrSQL.Fill(DR)
StrSQL.Dispose()
Dim usertable As DataTable = DR.Tables(0)
'datasource of the datagrid
DGridPres.DataSource = usertable
'change the data grid column name
DGridPres.Columns(0).HeaderText = "Medication"
DGridPres.Columns(1).HeaderText = "Drug"
DGridPres.Columns(2).HeaderText = "Duration"
DGridPres.Columns(3).HeaderText = "Dosage"
DGridPres.Columns(4).HeaderText = "Frquency"
DGridPres.Columns(5).HeaderText = "Instruction"
DGridPres.Columns(6).HeaderText = "Time"
DGridPres.Columns(7).HeaderText = "Date"
DGridPres.Columns(8).HeaderText = "Prescribed-By"
'close database
conMod.closeDB()
'catch exception
Catch ex As Exception
'dsplay message
Dim mymsg As New myMsgbox
With mymsg
.txtError.Text = "Error! Could not retrieve Patient prescription Information."
End With
End Try
End Sub </pre
tarhex
11-Mar-13 17:07pm
View
How can i paste it on paint?
tarhex
10-Mar-13 12:30pm
View
bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Image)
the 'bmap' ia null, i think it doesn't copy to clipboard
tarhex
10-Mar-13 12:02pm
View
on this line below;
bmap.Save(sfdImage.FileName, Imaging.ImageFormat.Bmp)
i reports this error: 'Object reference not set to an instance of an object.'
tarhex
10-Mar-13 11:37am
View
Well, i dunno if you can automate but i know you can create and populate the website database offline, save the file and upload (export) as i said earlier. You need to create a web server on your computer to achieve this. There are freewares available to create this web server, if you wish to create a PHP web server, you can try out WAMPSERVER but there are others there. WAMPSERVER is very easy to use.
tarhex
8-Mar-13 16:40pm
View
If that's the case, you can store data offline, whenever you are online, you save the database and upload.
tarhex
8-Mar-13 16:35pm
View
Well, let me rephrase the question from what i deduce. You want to be able to store data on your computer so that whenever you have internet access you can update your website database, right?
tarhex
8-Mar-13 16:22pm
View
I don't know the exact spot to copy and show you. But it's when i want to start the listener the error normally occur. this is the error reported; "Only one usage of each socket address (protocol/network address/port) is normally permitted"
Do you think if i use a separate port for all private chats, this will solve the problem?
tarhex
8-Mar-13 11:07am
View
@originalGriff thanks for the tip
tarhex
8-Mar-13 11:05am
View
ok
tarhex
8-Mar-13 11:01am
View
thank u, sir...
tarhex
8-Mar-13 9:49am
View
i have SQL server on my own machine i use for development. From what you are saying, an instance of SQL Server need to be in the server computer so that those SQL Server features will be functional? I believe there is a way to export the database, that is after development on my machine?
tarhex
8-Mar-13 7:57am
View
thanks for the reply.
are u saying, i need to install the full package software(sql server 2008) on the server machine?
Show More