you are welcome my frnd.
now if you got solution to your question completely then plz mark this thread as solved.
you are welcome my frnd.
now if you got solution to your question completely then plz mark this thread as solved.
Thanks for the link Laser.
I'll check that and get back with my feedback soon.
regards
Shouvik
hello caperjack i have also tried the step you said a long days ago. but i'm very sorry to say it didn't work. the burning was completed successfully but when i was trying to boot my pc from that disk it hadn't responded at all.
thanks any way for the replies you made.
did you read my previous reply thoroughly?
i checked the zip file and what i found is you have modified the code and you did it in wrong way. check my previous reply, there i already said don't include any file name in the textbox where you are typing the path , i.e., don't type like D:\Import\mstfile.csv. just type the path only i.e., D:\Import. the code will fetch all csv files located in the folder.
and the other one is ,
delete this line csv_path = "D:\import\mst.csv"
inside the function GetCSVFiles.
i hope this should now solve your problem.
regards
Shouvik
i will always recommend you to use sql server database instead of using access.
my bios supports booting from cd/dvd drives. but my windows xp professional cd is not bootable. it only contains installable files not the startup files.
thanks for the link you provided. but i already have these six files downloaded from some other site. but i haven't created the setup disks yet. can there be an option available that instead of using the FDDS i can create a setup disk using a cd or dvd? i mean can an ISO file for setup disks be possible to get?
ok andy, i think the following code is the complete solution for your question. just place a textbox, a button and a listbox on your form for testing. some changes i have made here over your logic and they are :-
1. you don't need to fix the location of the data folder. this code will create the data folder automatically in the same location from where the csv files are taken.
2. just type a valid path in the textbox and click the button to execute the code. for example, as you have given the path just type D:\Temp\Database in the textbox and click the button. don't mention any filename in the path. this code will automatically extract all csv stored inside this folder for you. if everything goes well you will be notified by a msg which is "Extraction complete."
plz give me a feedback here.
Option Explicit
Dim source_path As String
''this function will fetch all csv files stored inside the directory specified in csv_path variable ''as a parameter and add them in a listbox
[B]Public Function GetCSVFiles(ByVal csv_path As String) As Boolean[/B]
Dim FileName As String, ext As String, pos As Integer, i As Integer
On Error GoTo load_error
If Right(csv_path, 1) <> "\" Then
csv_path = csv_path & "\"
Else
csv_path = csv_path
End If
If Dir(Trim(csv_path)) = "" Then
GetCSVFiles = False
Exit Function
End If
source_path = csv_path
FileName = csv_path & "*.*"
Do Until FileName = ""
For …
Can anyone tell me where can I found the bootable files for installing windows xp professional (without service pack) as a standalone os?
all I have is a boot disk for windows 98 second edition. so the problem arises when i try to install winxp pro. before installing it i have to install win98 se otheriwse i can't install win xp.
if somebody can post any link here that would be much appreciated.
thanks in advance......
third party controls means you need to install some activex library in your local server other than what you get when you installed vb6. the library is a collection of controls like you see some basic controls in your project toolbox. there are lot of these are available in the net. just make some search in the google and you will find those.
here is a link for you :-
http://www.ingenuware.com/
regards
Shouvik
are you editing your primary key data also in your form along with other values and sending them as updated to the database?
if yes then avoid using that.
here your studentID is a primary key as well as autonumber field. so you can't update a primary key field as well as you cannot change its value because it is an autonumber field.
one more thing, always use the update statement instead of using the update method.
here is a sample :-
Dim conn as New ADODB.Connection
conn.connectionstring=<your connection string>
conn.open
conn.execute "update <your table name> set firstname='" & txtfirstname.text & "',lastname='" & txtlastname.text & "' where studentid='" & txtstudentid.text & "'"
hope this will help you.
regards
Shouvik
ok now i understood what you wish to do.
that's not a big issue to solve.
i'll post the code here.
just tell me one thing,
will the csv files be located in the application folder always or might it be stored in other locations also?
there is no need to use the timer control. u can easily fetch all csv files located inside a directory and create an array of those. then running a loop, taking an element from the array one by one, parsing data and creating the text file will do the job.
try the following syntax
Data1.RecordSource = "SELECT * FROM waqf where cardno LIKE '*" & Trim(s) & "*'"
regards
Shouvik
My problem is that how to convert date picker date(which is in text box) and save to database
use Convert.DateTime(Textbox1.text)
or
CDate(Textbox1.text)
make the last print command inside ur function body commented.
and one more thing, i have already tried your code in my system, it worked smoothly and displayed the following result :-
Procedure AnyNumberArguements received:
Procedure AnyNumberArguements received:
1 Procedure AnyNumberArguements received:
2 3 Procedure AnyNumberArguements received:
4 5 6 Procedure AnyNumberArguements received:
7 8 9 10 11 12
regards
Shouvik
this is a sample code here for you. try it. just place a button and a textbox (with default names) on your form for testing.
just to make sure the following references are included in your project :-
1. Microsoft Word <version no.> object library
2. Microsoft Activex Data Objects <version no.> library
and you can download the sample access database used in this script from this link :-
http://www.homeandlearn.co.uk/NET/AddressBook.zip
hope this helps.
plz do post your feedbacks here.
Option Explicit
Dim WithEvents w As Word.Application
Dim UnloadForm As Boolean
''change the path and word file name here
Const docName = "c:\Doc1.doc"
Private Sub Command1_Click()
Call ConnectDb_WriteToWord
End Sub
Private Sub Form_Activate()
If UnloadForm Then Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = ""
'Create the Word reference
On Error GoTo WordError
Set w = New Word.Application
w.Visible = True
Exit Sub
WordError:
MsgBox "Error creating a Word reference: " & Err.Description, vbCritical, "Automation Error"
UnloadForm = True
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo xx
'Quit Word and save changes
w.Quit wdSaveChanges
xx:
If Err.Number = 462 Then
MsgBox Err.Description, vbCritical + vbApplicationModal, "Error"
Exit Sub
End If
End Sub
Public Sub ConnectDb_WriteToWord()
Dim gcn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim str As String
Dim MyDoc As Document
Dim Opened As Boolean
''connecting with the database,
''fetching all contacts and
''writing them one by one in the textbox
gcn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & …
everything is possible
just need some effort and patiene
so show use what have u done so far to get answer to ur question.
hi andy,
as far as I see from ur attachment,
you r accepting path of a .csv file and then clicking on import, create a data folder in ur application path and then creating a separate tect file for each rows presented in the csv file.
ok as i read in ur post you want an automated process and this is exactly what is going on in ur existing project.
so what else now u r expecting to do from us?
you can also use Setup Factory or Inno Setup to make installer for your projects.
Of them Inno Setup is a freeware.
it might be. but using ms-access directly to create ur db may raise a version confliction problem when you will be trying to connect it from your vb application.
for your kind information, your vb application is unable to access data from any db created in ms-access rather than version 97 and 2000. this means you must have ms-office 97 or 2000 installed on ur local server to make able ur apps directly communicate with access db (if it is created using ms-access IDE also). if u installed ms-office rather than the two mentioned versions you must use visual data manager to create ur access db.
it is always recommended that for a big amount of data transfer use RDBMS having extendable flexibility rather ms access. I will advise you to use sql server instead of using ms access.
if you still wish to continue with your option then you might be required to install a service pack for visual basic 6. seearch for it in google or goto download.microsoft.com site and from there download Visual Basic 6.0 service pack 6 files.
regards
Shouvik
call the function from some other event expect form_load.
try it inside of a command button click event.
it will work.
regards
Shouvik
no i haven't tried that but might be you are right. the same question is also moving in my mind also that the installer is corrupted.
tell me one more thing does this problem arise if my computer is been affected by viruses? if yes so to clean it will solve my problem?
one of my frnd said i should manually copy the files such as webdev.webserver.exe and other language compilers such as for vb.net and c#. will that solve this problem?
plz reply hurry as this is very much urgent. my assignments have been blocked for this.
regards
Shouvik
i created a game program using vb6 and i finish it already my problem is how can i make this program ready to install in or become installer.
follow the following steps to create the installer for ur project. but before trying this make sure that u have created the executable(.exe) for ur project. hope u know how to create that.
1.close ms vb6.0 ide
2.click start>-programs->microsoft visual studio 6.0->microsoft visual studio 6.0 tools->package and deployment wizard
3.click browse to locate ur project file(.vbp)
4.click package
5.click yes to start the recompilation process
6.in package type select standard setup package and click next
7.select the destination where u want to create the package folder for ur project.this folder will contain all the supported and main application files required to install ur apps in some other client machine.
8.click yes to create the folder if it doesn't exist and click next
9.the next list that will come will display all necessary files to build the setup.click add to insert some other files from ur project to the said list.if u any access database file,click this button,locate ur db file and click open to add the file to the list.this list will also help u to remove any unnecessary files that u donot wish to install in the target machine with apps.u can also add help files(if any) for project from this option.but do not ever try to remove the .dll,.ocx,.lib …
Hello all,
If I posted in wrong forum point me to the correct direction.
I have installed Visual Studio 2005 (.Net 2.0) in my Windows Xp Service Pack 2 operating system.
When the setup had finished the wizard displayed me the following message :-
"Success
Visual Studio Setup is complete.
Setup is completed with some warnings."
Now when I clicked the "View Error Log" link a web document opened and there I found so many lines. Of them one is :-
"Failed to copy the file properly Webdev.Webserver.Exe"
Now when I'm trying to launch Vs2005 IDE, it is working but when I'm trying to run my programs by pressing F5 or anyone of the available debugger options I'm fetching the following errors :-
In case of windows applications (regradless whether the selected language is VB or C#) :-
"The application failed to initiliaze properly (0xc000007b). Click on OK to terminate the application."
In case of web applications (regardless whether the selected language is VB or C#) :-
"Unable to connect to visual studio's localhost web server."
These nasty errors have been irritated me so much. so to get rid of them I have been already formated and re-installed my operating system twice and then installed vs2005. But the problem remains same.
At this stage I just can't understand what should I do.
This is my request to all of you experts here plz guide me to …
did you try to register the dll with your operating system?
if not then try using this command :-
regsvr32 <your dll file name>.Dll
then create a reference to the file from Project->References
i am a newbie to the vb timer control..can any one give me few samples of vb timer usage and yeah one more thing how to make a progress bar using timer..:|
check out this sample program.
get me your feedback please.
regards
Shouvik
Hello,
I need to a browse button to be able to open an image in the image control and also be able to get the path for the image...
Can anyone help...
Check out this sample project. look the screenshot also.
and tell me what do you think about it.
regards
Shouvik
hey
im real sorry about this but none of the forums ive looked at help me much.
basicly ive created a database for usernames and passwords and i want to make vb check the database for passwords and usernames. im usine vb6.0 if any one could just tell me the script...
as Jx_Man said you must provide us what have you done so far. ok as this is your first time visit i'm providing you the script. here is a sample snippet for you. try it.
this script is based on access database. if you are using any other rdbms then you have to change the provider name in the connection string accordingly.
don't just copy and paste this from here to your form. replace the following with your objects :-
1. user.mdb --> database name. change with your db name
2. info --> table name. change with your table name
[this table contains two columns; username and password. so change accordingly what you have in your table]
3. txtusername --> textbox accepting username from user. change with your textbox object name
4. txtpassword --> textbox accepting password. change with your password textbox object name
and add a reference to Microsoft Activex Data Objects <version no.> Library from Project->References
Option Explicit
Dim gcn As New ADODB.Connection
Private Sub Command1_Click()
Dim str As String
Dim rs As New ADODB.Recordset
If Trim(txtusername.Text) = "" Then
MsgBox "Mention username."
txtusername.SetFocus
Exit Sub …
VB.Net is the newer enhancements for the visual basic language. the main vb language came in 1994 and it was included as a member of a software toolkit named "Microsoft Visual Studio 6.0". this version of visual studio also had some other languages like "Visual Foxpro", "Visual Interdev" which are dead now. among from these visual interdev was used to build web based applications using visual basic as the standalone language. now microsoft has released the modern version of VS and also newer technology to build web solutions which is known as ASP.Net.
practically you can apply your knowledge in .net version of vb also. but there are so many changes happened there over vb6. vb6 was object based language but now in .net platform visual basic has been enhanced as a full fledge object oriented programming language. so it offers more practical OOP concepts over vb6. we can apply core concepts of OOP like abstraction,encapsulation, polimorphism and inheritance in vb.net more easily and it maintains the OOP standards. with vb6 we can also do such things but there did not maintain the OOP standards. as .net platform is running on CLR so there is more flexibility in writing programs because you can use more than one programming language under a single environment.
but for beginners starting with vb.net is not so good option. you should start your programming experience in vb6 and then apply your knowledges in vb.net to enhance it. …
zawpai my frnd,
you are right. playing with windows registry without proper caution can cause harmful damages to your system. apart from this, the registry is a local repository which differs from machine to machine and to play with registry you need to code more security. on the other hand, finding slno. of a hdd is not so complex and it is more secure.
but what jx_man and vleditorlover said can be applicable also. look man we r all here to give you suggestion. now what else you will do it completely depends upto you.
here is a code snippet for you. try this.
here a listview control is used to display values from some selected columns.
here conn is the connection object. replace used ones with your object names
Dim str as string
Dim rs as New ADODB.Recordset
Dim li as ListItem
str="select ecode,ename,salary from employee order by ecode"
rs.open str,conn,1,2
if rs.recordcount>0 then
rs.movefirst
while not rs.eof()
with listview1
set li=.listitems.add(,,(rs!ecode))
li.subitems(1)=rs!ename
li.subitems(2)=format(rs!salary,"0.00")
end with
rs.movenext
wend
end if
if rs.state=adstateopen then rs.close
set rs=nothing
regards
Shouvik
check out this code
Public Sub DailyReportDisplay(Query As String)
Set CRXReport = CrystalReport2
Set CRXDb = CRXReport.Database
CRXReport.DiscardSavedData
inti = 1
Do Until inti = CRXReport.Database.Tables.count + 1
CRXReport.Database.Tables.Item(inti).SetLogOnInfo strdblocation, "<your table name>", "<user id>", "<password>"
inti = inti + 1
Loop
CrystalReport2.SQLQueryString = Query
With FrmReport
.Show
.CRV1.ReportSource = CRXReport
.CRV1.ViewReport
End With
Set CRXReport = Nothing
End Sub
though this is not the correct forum to describe on this matter but anyways here is your answer.
you are attempting implicit datatype conversions or more frankly type casting which is invalid in this context. coz you can't store a text or string value directly to an numeric variable. before doing it make proper type casting like convert string to numbers or numbers to string/characters.
change your code as this :-
pagoHora = Integer.parse(trim(txtPagoPorHora.Text))
OR,
pagoHora = val(trim(txtPagoPorHora.Text))
as I can see in your posted code you will again face the same error in the next line also. as horas is an integer variable and you are putting a string value to it. this cannot be done. make proper casting before doing that.
and one more thing my frnd, always check for the right forum before you post your question. this will help you to find or get your answer more quickly and easily. this forum is visual basic 6 and older versions.
For any further post that you might make plz goto Visual Basic.Net Forum.
with best regards
Shouvik
the most secured way to solve your problem is to find the hard disk serial no. of the pc where you wish to install your application only. When starting the program get the HDD serial no and compare it with serialno. of the pc where you wish to solely install it. if it matches then run the program else throw a msg to end-user. this is the most secured way because the serial no. of the Hard disk is unchangeable even after formatting.
i have attached sample snippet. there you will find some code on how to find the slno. of ur hdd. just put a command button on the form for testing and copy the code inside it.
hope this will give you some guidelins.
regards
Shouvik
Option Explicit
Private Const GENERIC_READ = &H80000000
Private Const GENERIC_WRITE = &H40000000
Private Const FILE_SHARE_READ = &H1
Private Const FILE_SHARE_WRITE = &H2
Private Const OPEN_EXISTING = 3
Private Const CREATE_NEW = 1
Private Const INVALID_HANDLE_VALUE = -1
Private Const VER_PLATFORM_WIN32_NT = 2
Private Const IDENTIFY_BUFFER_SIZE = 512
Private Const OUTPUT_DATA_SIZE = IDENTIFY_BUFFER_SIZE + 16
'GETVERSIONOUTPARAMS contains the data returned
'from the Get Driver Version function
Private Type GETVERSIONOUTPARAMS
bVersion As Byte 'Binary driver version.
bRevision As Byte 'Binary driver revision
bReserved As Byte 'Not used
bIDEDeviceMap As Byte 'Bit map of IDE devices
fCapabilities As Long 'Bit mask of driver capabilities
dwReserved(3) As Long 'For future use
End Type
'IDE registers
Private Type IDEREGS
bFeaturesReg As Byte 'Used for specifying SMART "commands"
bSectorCountReg As Byte 'IDE sector count register
bSectorNumberReg As Byte 'IDE sector number register
bCylLowReg As Byte 'IDE low order cylinder value
bCylHighReg As Byte 'IDE high order cylinder value
bDriveHeadReg As Byte 'IDE drive/head register
bCommandReg As Byte 'Actual IDE command
bReserved As Byte 'reserved for future use - must be zero
End Type
'SENDCMDINPARAMS contains the input parameters for the
'Send Command to Drive function
Private Type SENDCMDINPARAMS
cBufferSize As Long 'Buffer size in bytes
irDriveRegs As IDEREGS 'Structure with drive register values.
bDriveNumber As Byte 'Physical drive number to send command to (0,1,2,3).
bReserved(2) As Byte 'Bytes reserved
dwReserved(3) As Long 'DWORDS reserved
bBuffer() As Byte 'Input buffer.
End Type
'Valid values for the bCommandReg member of IDEREGS.
Private Const IDE_ID_FUNCTION = &HEC 'Returns ID sector for ATA.
Private Const IDE_EXECUTE_SMART_FUNCTION = &HB0 'Performs SMART cmd.
'Requires valid bFeaturesReg,
'bCylLowReg, and bCylHighReg
'Cylinder register values required when issuing SMART command
Private Const SMART_CYL_LOW = &H4F
Private Const SMART_CYL_HI = &HC2
'Status returned from driver
Private Type DRIVERSTATUS
bDriverError As Byte 'Error code from driver, or 0 if no error
bIDEStatus As Byte 'Contents of IDE Error register
'Only valid when bDriverError is SMART_IDE_ERROR
bReserved(1) As Byte
dwReserved(1) As Long
End Type
Private Type IDSECTOR
wGenConfig As Integer
wNumCyls As Integer
wReserved As Integer
wNumHeads As Integer
wBytesPerTrack As Integer
wBytesPerSector As Integer
wSectorsPerTrack As Integer
wVendorUnique(2) As Integer
sSerialNumber(19) As Byte
wBufferType As Integer
wBufferSize As Integer
wECCSize As Integer
sFirmwareRev(7) As Byte
sModelNumber(39) As Byte
wMoreVendorUnique As Integer
wDoubleWordIO As Integer
wCapabilities As Integer
wReserved1 As Integer
wPIOTiming As Integer
wDMATiming As Integer
wBS As Integer
wNumCurrentCyls As Integer
wNumCurrentHeads As Integer
wNumCurrentSectorsPerTrack As Integer
ulCurrentSectorCapacity As Long
wMultSectorStuff As Integer
ulTotalAddressableSectors As Long
wSingleWordDMA As Integer
wMultiWordDMA As Integer
bReserved(127) As Byte
End Type
'Structure returned by SMART IOCTL commands
Private Type SENDCMDOUTPARAMS
cBufferSize As Long 'Size of Buffer in bytes
DRIVERSTATUS As DRIVERSTATUS 'Driver status structure
bBuffer() As Byte 'Buffer of arbitrary length for data read from drive
End Type
'Vendor specific feature register defines
'for SMART "sub commands"
Private Const SMART_ENABLE_SMART_OPERATIONS = &HD8
'Status Flags Values
Public Enum STATUS_FLAGS
PRE_FAILURE_WARRANTY = &H1
ON_LINE_COLLECTION = &H2
PERFORMANCE_ATTRIBUTE = &H4
ERROR_RATE_ATTRIBUTE = &H8
EVENT_COUNT_ATTRIBUTE = &H10
SELF_PRESERVING_ATTRIBUTE = &H20
End Enum
'IOCTL commands
Private Const DFP_GET_VERSION = &H74080
Private Const DFP_SEND_DRIVE_COMMAND = &H7C084
Private Const DFP_RECEIVE_DRIVE_DATA = &H7C088
Private Type ATTR_DATA
AttrID As Byte
AttrName As String
AttrValue As Byte
ThresholdValue As Byte
WorstValue As Byte
StatusFlags As STATUS_FLAGS
End Type
Private Type DRIVE_INFO
bDriveType As Byte
SerialNumber As String
model As String
FirmWare As String
Cilinders As Long
Heads As Long
SecPerTrack As Long
BytesPerSector As Long
BytesperTrack As Long
NumAttributes As Byte
Attributes() As ATTR_DATA
End Type
Private Enum IDE_DRIVE_NUMBER
PRIMARY_MASTER
PRIMARY_SLAVE
SECONDARY_MASTER
SECONDARY_SLAVE
TERTIARY_MASTER
TERTIARY_SLAVE
QUARTIARY_MASTER
QUARTIARY_SLAVE
End Enum
Private Declare Function CreateFile Lib "kernel32" _
Alias "CreateFileA" _
(ByVal lpFileName As String, _
ByVal dwDesiredAccess As Long, _
ByVal dwShareMode As Long, _
lpSecurityAttributes As Any, _
ByVal dwCreationDisposition As Long, _
ByVal dwFlagsAndAttributes As Long, _
ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" _
(ByVal hObject As Long) As Long
Private Declare Function DeviceIoControl Lib "kernel32" _
(ByVal hDevice As Long, _
ByVal dwIoControlCode As Long, _
lpInBuffer As Any, _
ByVal nInBufferSize As Long, _
lpOutBuffer As Any, _
ByVal nOutBufferSize As Long, _
lpBytesReturned As Long, _
lpOverlapped As Any) As Long
Private Declare Sub CopyMemory Lib "kernel32" _
Alias "RtlMoveMemory" _
(hpvDest As Any, _
hpvSource As Any, _
ByVal cbCopy As Long)
Private Type OSVERSIONINFO
OSVSize As Long
dwVerMajor As Long
dwVerMinor As Long
dwBuildNumber As Long
PlatformID As Long
szCSDVersion As String * 128
End Type
Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" _
(LpVersionInformation As OSVERSIONINFO) As Long
Private Sub Command1_Click()
Command1.Caption = "Get Drive Info"
Dim di As DRIVE_INFO
Dim model As String, slno As String
di = GetDriveInfo(0)
model = Trim$(di.model)
slno = di.SerialNumber
MsgBox "Your HDD Info :-" & vbCrLf & vbCrLf & _
"Model : " & model & vbCrLf & _
"Serial No. : " & slno, vbInformation, "Drive Info"
End
End Sub
Private Function GetDriveInfo(drvNumber As IDE_DRIVE_NUMBER) As DRIVE_INFO
Dim hDrive As Long
Dim di As DRIVE_INFO
hDrive = SmartOpen(drvNumber)
If hDrive <> INVALID_HANDLE_VALUE Then
If SmartGetVersion(hDrive) = True Then
With di
.bDriveType = 0
.NumAttributes = 0
ReDim .Attributes(0)
.bDriveType = 1
End With
If SmartCheckEnabled(hDrive, drvNumber) Then
If IdentifyDrive(hDrive, IDE_ID_FUNCTION, drvNumber, di) = True Then
GetDriveInfo = di
End If 'IdentifyDrive
End If 'SmartCheckEnabled
End If 'SmartGetVersion
End If 'hDrive <> INVALID_HANDLE_VALUE
CloseHandle hDrive
End Function
Private Function IdentifyDrive(ByVal hDrive As Long, _
ByVal IDCmd As Byte, _
ByVal drvNumber As IDE_DRIVE_NUMBER, _
di As DRIVE_INFO) As Boolean
'Function: Send an IDENTIFY command to the drive
'drvNumber = 0-3
'IDCmd = IDE_ID_FUNCTION or IDE_ATAPI_ID
Dim SCIP As SENDCMDINPARAMS
Dim IDSEC As IDSECTOR
Dim bArrOut(OUTPUT_DATA_SIZE - 1) As Byte
Dim cbBytesReturned As Long
With SCIP
.cBufferSize = IDENTIFY_BUFFER_SIZE
.bDriveNumber = CByte(drvNumber)
With .irDriveRegs
.bFeaturesReg = 0
.bSectorCountReg = 1
.bSectorNumberReg = 1
.bCylLowReg = 0
.bCylHighReg = 0
.bDriveHeadReg = &HA0 'compute the drive number
If Not IsWinNT4Plus Then
.bDriveHeadReg = .bDriveHeadReg Or ((drvNumber And 1) * 16)
End If
'the command can either be IDE
'identify or ATAPI identify.
.bCommandReg = CByte(IDCmd)
End With
End With
If DeviceIoControl(hDrive, _
DFP_RECEIVE_DRIVE_DATA, _
SCIP, _
Len(SCIP) - 4, _
bArrOut(0), _
OUTPUT_DATA_SIZE, _
cbBytesReturned, _
ByVal 0&) Then
CopyMemory IDSEC, bArrOut(16), Len(IDSEC)
di.model = StrConv(SwapBytes(IDSEC.sModelNumber), vbUnicode)
di.SerialNumber = StrConv(SwapBytes(IDSEC.sSerialNumber), vbUnicode)
IdentifyDrive = True
End If
End Function
Private Function IsWinNT4Plus() As Boolean
'returns True if running Windows NT4 or later
Dim osv As OSVERSIONINFO
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
IsWinNT4Plus = (osv.PlatformID = VER_PLATFORM_WIN32_NT) And _
(osv.dwVerMajor >= 4)
End If
End Function
Private Function SmartCheckEnabled(ByVal hDrive As Long, _
drvNumber As IDE_DRIVE_NUMBER) As Boolean
'SmartCheckEnabled - Check if SMART enable
'FUNCTION: Send a SMART_ENABL
must be some syntax errors. rectify like this :-
Text3.text=do_encrypt(Text1.text,Text2.text)
regards
Shouvik
If I was not wrong the term should be "Download" instead of "Upload".
Check out this sample code, There you will find some syntax on how to add data from msflexgrid to database.
regards
Shouvik
i wait you as lacking endurance.
What does it mean?????????
Hi folks my question is how can I determine the size of an array in runtime dynamically. Like in VB we do this :-
Dim x() as Integer,i as Integer
i=5
Redim Preserve x(i)
so what is the equivalent syntax for this in C#?
the above code won't work with crpt10.
it is limited to version 8.5 only as their is no crystal report control available with versions 9 and above. all there is crystal report viewer. and its syntax is completely different.
make some googling.
well my friend as far as I know the procedure which I provided to you is 100% correct. Seems you are facing problem by your OS. Try re-installing the OS and then re-try the steps. Make sure you donot select the workgroup option while installing windows when it will ask you for the network administration.
Or,
Can it be possible for you to upload your project so that somebody can check it out in his/her local server and suggest you the appropriate solution?
Waiting for your answer.
Regards
Shouvik
can any one give me lv button.ocx
Here it is.
regards
Shouvik
Ok i have figured this out.
thanks to the replied person and all who have paid visit to see this thread.
now this thread is closed.
bye.......
many many thanks to all. thistime shuvi's code works well. thx again shuvi.
glad to hear that. but cometburn's syntax is also correct. you can apply that also.
(completely upto you).
ok....
if u got your answer then mark this thread solved.
regards
Shouvik
i'll post the code here.
well as far as i can see you just mentioned the database file name which is not enough.
mention the complete physical path of your db file or select it by clicking on the ellipse button.
and make sure you have selected the correct provider.
in case of yours it should be Microsoft.Jet.OLEDB.4.0
glad to help you out.
if you have got ur answer then mark this thread solved.
ok......
bye
one thing you can do. just put a if condition inside your validate event before the code for checking existence of the textbox's value. check if the textbox has null value in it or not. if it don't then fire the code else just exit the sub. like this :-
private sub text1_validate()
if trim(text1.text)<>"" then
<your code for checking into database>
else <as the textbox is empty, so there is no need to check for the code into the database
exit sub
end if
end sub
regards
Shouvik
well this didn't work in sql server 7.0.
your linked article points me to sql server 2005 t-sqls which i donot require at this moment. i wish to do this job in 7.0 version. so, could you give me a sample code?