Click here to Skip to main content
15,908,834 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRelation setting Pin
niwre the newbie2-Nov-08 18:07
niwre the newbie2-Nov-08 18:07 
Questionusing files Pin
revath2-Nov-08 17:58
revath2-Nov-08 17:58 
AnswerRe: using files Pin
Ashfield2-Nov-08 20:27
Ashfield2-Nov-08 20:27 
AnswerRe: using files Pin
Steven J Jowett2-Nov-08 23:22
Steven J Jowett2-Nov-08 23:22 
QuestionMe.Location Pin
User 54091902-Nov-08 11:15
User 54091902-Nov-08 11:15 
AnswerRe: Me.Location Pin
Dave Kreskowiak2-Nov-08 11:26
mveDave Kreskowiak2-Nov-08 11:26 
AnswerRe: Me.Location Pin
Luc Pattyn2-Nov-08 12:16
sitebuilderLuc Pattyn2-Nov-08 12:16 
QuestionNeed Help to Create DSN in Installer Class [modified] Pin
Saseendran Kombath1-Nov-08 7:51
Saseendran Kombath1-Nov-08 7:51 
Private Declare Function SQLConfigDataSource Lib "ODBCCP32.DLL" (ByVal hwndParent As Integer, ByVal ByValfRequest As Integer, ByVal lpszDriver As String, ByVal lpszAttributes As String) As Integer
Private Const vbAPINull As Integer = 0 ' NULL Pointer
Private Const ODBC_ADD_DSN As Short = 4 ' Add data source
Private Const ODBC_REMOVE_DSN As Short = 6 ' Remove data source

Public Sub Create_System_DSN()
Dim intRet As Integer
Dim Driver As String
Dim Attributes As String
'Set the driver to SQL Server because it is most common.
Driver = "Microsoft Access Driver (*.MDB)"

Attributes = "DSN=Sipe" & Chr(0)
Attributes = Attributes & "DESCRIPTION=Sipe ODBC Connection" & Chr(0)
Attributes = Attributes & "DBQ=F:\Sipe.mdb" & Chr(0)
'To show dialog, use Form1.Hwnd instead of vbAPINull.
intRet = SQLConfigDataSource(vbAPINull, ODBC_ADD_DSN, Driver, Attributes)
If intRet <> 0 Then
MsgBox("DSN Created")
Else
MsgBox("Create Failed")
End If
End Sub

Above code in a form with a button click is working fine

Need help on how to create the same DSN after installing a software

Saseendran Kombath

modified on Sunday, November 2, 2008 12:07 PM

AnswerRe: Need Help to Create DSN in Installer Class Pin
Dave Kreskowiak1-Nov-08 11:48
mveDave Kreskowiak1-Nov-08 11:48 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath1-Nov-08 15:16
Saseendran Kombath1-Nov-08 15:16 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Dave Kreskowiak1-Nov-08 15:29
mveDave Kreskowiak1-Nov-08 15:29 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath1-Nov-08 17:05
Saseendran Kombath1-Nov-08 17:05 
GeneralRe: Need Help to Create DSN in Installer Class Pin
Saseendran Kombath2-Nov-08 6:42
Saseendran Kombath2-Nov-08 6:42 
QuestionCreate .CAB file using Winzip Pin
~Khatri Mitesh~1-Nov-08 4:45
~Khatri Mitesh~1-Nov-08 4:45 
AnswerRe: Create .CAB file using Winzip Pin
Dave Kreskowiak1-Nov-08 14:17
mveDave Kreskowiak1-Nov-08 14:17 
AnswerRe: Create .CAB file using Winzip Pin
Thomas Stockwell3-Nov-08 1:50
professionalThomas Stockwell3-Nov-08 1:50 
AnswerRe: Create .CAB file using Winzip Pin
Jon_Boy3-Nov-08 2:45
Jon_Boy3-Nov-08 2:45 
GeneralRe: Create .CAB file using Winzip Pin
~Khatri Mitesh~5-Nov-08 23:11
~Khatri Mitesh~5-Nov-08 23:11 
QuestionHow to change pixel size for an image Pin
Vineet Swami1-Nov-08 3:20
Vineet Swami1-Nov-08 3:20 
AnswerRe: How to change pixel size for an image Pin
Guffa1-Nov-08 6:11
Guffa1-Nov-08 6:11 
GeneralRe: How to change pixel size for an image [modified] Pin
Luc Pattyn1-Nov-08 6:35
sitebuilderLuc Pattyn1-Nov-08 6:35 
QuestionTransfer data from one database to another Pin
pank@12341-Nov-08 3:07
pank@12341-Nov-08 3:07 
AnswerRe: Transfer data from one database to another Pin
Dave Kreskowiak1-Nov-08 5:12
mveDave Kreskowiak1-Nov-08 5:12 
GeneralRe: Transfer data from one database to another Pin
pank@12342-Nov-08 17:43
pank@12342-Nov-08 17:43 
GeneralRe: Transfer data from one database to another Pin
Dave Kreskowiak3-Nov-08 1:39
mveDave Kreskowiak3-Nov-08 1:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.