adodb

How to connect to SQL Server running on AWS?

北战南征 提交于 2019-12-08 14:19:33
问题 I am trying to connect to a SQL server running on AWS, located on a VM, the IP addresses of the VM and SQL server are different, can anyone please help me in creating a connection string? The following connection string works inside the VM, but not outside where I want to connect: sConnString = "Provider=SQLOLEDB;Persist Security Info=True;User ID=***;password=***;Initial Catalog=Dbname;Data Source=10.0.1.122;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=****

problems reading doubles from CSV - VBA

无人久伴 提交于 2019-12-08 12:52:51
问题 I want to read a csv file from vba-excel but i have a problem with double values, from example, this value in the csv: 125.5 is read without dot. So i get 1255. My code: Dim rs As New ADODB.Recordset strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & myDir & ";" & "Extended Properties=""text;HDR=Yes;FMT=Delimited()"";" strSQL = "SELECT * FROM " & myFileName rs.Open strSQL, strCon, 3, 3 IBH = rs("IBH") How can i solve? update: I tried @Siddharth Rout solution, but i still have the same

getting run time error 91 [object variable or with block variable not set]

大城市里の小女人 提交于 2019-12-08 12:30:38
问题 i am trying the code below to pull from access db, but getting error 91, please suggest how to remove the error. Private Sub CommandButton1_Click() Dim con As ADODB.Connection Dim rs As ADODB.Recordset Dim strConn As String Set con = New ADODB.Connection con.Mode = adModeReadWrite If con.State = adStateClosed Then strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & "C:\temp\db2.mdb;Persist Security Info=False;" con.ConnectionString = strConn con.Open End If Dim startRow As Integer **

open adodb connection to excel file in read only mode

倾然丶 夕夏残阳落幕 提交于 2019-12-08 11:56:15
问题 Case : opening as read-only an excel file (.xlsx) using adodb.connection inside a VBA script in Excel 2013 on Windows 7 64bit. Problem : the excel file seems to be opened for editing even setting the Mode parameter as Read in the connection string of adodb in order to open the connection in read-only mode: szConnect = "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=" & SourceFile & ";" & _ "Mode=Read;" & _ "Extended Properties=""Excel 12.0;HDR=Yes;"";" Test : I set a break point after

Connect to Foxpro with PHP using OLE DB driver

别等时光非礼了梦想. 提交于 2019-12-08 09:16:42
问题 I'm trying to connect to a Foxpro database using the OLE DB Driver I downloaded the driver from http://www.microsoft.com/en-us/download/details.aspx?id=14839 and installed it then create a php script $conn = new COM("ADODB.Connection") or die("Cannot start ADO"); $conn->Open("Provider=vfpoledb.1;Data Source=C:\Opera3\Comp_I.DBC;Collating Sequence=machine"); This gives me the following error Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> ADODB.Connection<br/><b

Excel VBA SQL driver that supports >65k rows

家住魔仙堡 提交于 2019-12-08 08:32:31
问题 I have an interesting issue when querying Excel data through VBA in Excel 2010. I am using these drivers to connect to xls or xls(x|m) files: Sub OpenCon(ByRef theConn As Connection, ByVal FilePath As String) 'Opens the connection based on Excel version If Right(FilePath, 4) = ".xls" Then theConn.Open "Driver={Microsoft Excel Driver (*.xls)};" & _ "DriverId=790;" & _ "Dbq=" & FilePath & ";" & _ "DefaultDir=" & FilePath Else theConn.Open "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm,

php mysql adodb

老子叫甜甜 提交于 2019-12-08 07:41:01
问题 I'm using PHP with adodb but come up against a massive problem. I'm using adodb to speed up development so I can do thing like: $r["Name"] = $_POST['txtName']; if ($_POST["ID"] != "") $conn->AutoExecute("content", $r, 'UPDATE', 'AutoID = ' . $_POST["ID"]); else $conn->AutoExecute("content", $r, 'INSERT'); However if that name was to have a single quote in it saves into db with a slash! So if the name is Testimonial's it will save as Testimonial\'s which is causing me massive problems, is

Return dates (not strings) from an ADODB query

放肆的年华 提交于 2019-12-08 03:12:05
问题 The function below works fine and outputs the correct result except it outputs the dates as strings and not as dates. How can I get it to output dates instead? Function GetExpiries_YieldX(TradeDate As Date, Code As String) As Variant 'Create and open the connection Dim oConnection As Connection Set oConnection = New Connection oConnection.ConnectionString = strConnectionStringYieldX oConnection.Open 'Create the command object Dim oCommand As Command Set oCommand = New Command oCommand

ADODB component causes access violation on Win7/Server 2008

笑着哭i 提交于 2019-12-07 18:09:24
问题 I have a piece of code written in Delphi 2005 that searches for a particular attribute on a user in LDAP. I get an access violation when this is run on either Windows 7 or Server 2008, but not on XP or 2003. Function IsSSOUser(UserId: String): Boolean; var S : string; ADOQuery : TADOQuery; ADOConnectionSSO: TADOConnection; begin result := false; Setdomainname; ADOQuery := TADOQuery.Create(nil); ADOConnectionSSO := TADOConnection.Create(nil); try ADOConnectionSSO.LoginPrompt := false;

Excel VBA SQL driver that supports >65k rows

你说的曾经没有我的故事 提交于 2019-12-06 15:12:45
I have an interesting issue when querying Excel data through VBA in Excel 2010. I am using these drivers to connect to xls or xls(x|m) files: Sub OpenCon(ByRef theConn As Connection, ByVal FilePath As String) 'Opens the connection based on Excel version If Right(FilePath, 4) = ".xls" Then theConn.Open "Driver={Microsoft Excel Driver (*.xls)};" & _ "DriverId=790;" & _ "Dbq=" & FilePath & ";" & _ "DefaultDir=" & FilePath Else theConn.Open "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};" & _ "DriverId=790;" & _ "Dbq=" & FilePath & ";" & _ "DefaultDir=" & FilePath End If End Sub